Package org.eclipse.birt.chart.factory
Class RunTimeContext
java.lang.Object
org.eclipse.birt.chart.factory.RunTimeContext
- All Implemented Interfaces:
Serializable
Encapsulates runtime information associated with each chart generation and
rendering session. It contains global objects that are defined per request.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPredifined static keys for states. -
Constructor Summary
ConstructorsConstructorDescriptionA default zero-arg public constructor used for object creation. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all the stored states.voidenableNonHierarchyCategoryData(boolean enabled) externalizedMessage(String sChartKey) A convenience method provided to lookup externalized messages associated with a given message key.Returns the IActionRenderer of current runtime context.Returns instance of default value chart.Returns the LegendItemLayoutHints for current context.Deprecated.org.eclipse.birt.core.i18n.ResourceHandleReturns an instance of the resource handle for which chart specific messages are externalized.Returns the script classLoader if available.Returns an instance of a script context associated with the chart being generated.Returns an instance of a transient script handler associated with the chart being generated.Returns the series renderers for current context.Returns the shared scaleReturns the state object from store by the key.<T> TgetState(RunTimeContext.StateKey<T> key) Returns an instance of the structure definition listner for device renderers that need a structure definition notification when rendering primitives.com.ibm.icu.util.TimeZonecom.ibm.icu.util.ULocaleReturns the locale associated with this runtime context.booleanReturns if current context is in a right-left platform.booleanReturns true if current text reading order is Right To LeftbooleanReturns if scriting is enabled in current context.booleanbooleannotifyStructureChange(String sEventName, Object oSource) Notifies the structure definition listener of a change in the current running structure that defines a group of primitives being rendered and puts them into context with reference to the source object.voidPuts a state object to the store.<T> voidputState(RunTimeContext.StateKey<T> key, T value) removeState(Object key) Removes the state object by the key.voidSets an IActionRenderer instance to current runtime context.voidSets instance of default value chart.voidsetExternalizer(IExternalizer externalizer) voidSets the LegendItemLayoutHints for current context.voidDeprecated.usesetULocale(ULocale)instead.voidDefines an externalized message lookup implementation per chart model being executed.voidsetResourceFinder(IResourceFinder resourceFinder) voidsetResourceHandle(org.eclipse.birt.core.i18n.ResourceHandle rh) Specifies a resource handle that facilitates retrieval of chart specific externalized messages.voidsetRightToLeft(boolean value) Sets the right-left mode for current context mandatorily.voidsetRightToLeftText(boolean value) Sets the bidi text mode of the current chart object .voidSets the script classLoader.voidSets an instance of a chart script context associated with the chart being generated.voidSets an instance of a transient script handler associated with the chart being generated.voidsetScriptingEnabled(boolean value) Sepcifies if to enable scripting in current context.voidSets the series renderers for current context.voidsetSharedScale(SharedScaleContext ssContext) Sets the shared scalevoidsetSharingQuery(boolean isSharingQuery) voidInternally sets an instance of the structure definition listener for device renderers that need a structure definition notification when rendering primitives.voidsetTimeZone(com.ibm.icu.util.TimeZone timeZone) voidsetULocale(com.ibm.icu.util.ULocale lcl) Sets the locale associated with this runtime context.boolean
-
Constructor Details
-
RunTimeContext
public RunTimeContext()A default zero-arg public constructor used for object creation.
-
-
Method Details
-
putState
Puts a state object to the store.- Parameters:
key-state-
-
getState
Returns the state object from store by the key.- Parameters:
key-- Returns:
-
removeState
Removes the state object by the key.- Parameters:
key-- Returns:
-
clearState
public void clearState()Clears all the stored states. -
isScriptingEnabled
public boolean isScriptingEnabled()Returns if scriting is enabled in current context.- Returns:
-
setScriptingEnabled
public void setScriptingEnabled(boolean value) Sepcifies if to enable scripting in current context.- Parameters:
value-
-
getScriptClassLoader
Returns the script classLoader if available.- Returns:
-
setScriptClassLoader
Sets the script classLoader.- Parameters:
value-
-
setStructureDefinitionListener
Internally sets an instance of the structure definition listener for device renderers that need a structure definition notification when rendering primitives.- Parameters:
isdl- The structure definition listener associated with the runtime context.
-
getStructureDefinitionListener
Returns an instance of the structure definition listner for device renderers that need a structure definition notification when rendering primitives.- Returns:
- The structure definition listener associated with the runtime context.
-
setActionRenderer
Sets an IActionRenderer instance to current runtime context.- Parameters:
iar-
-
getActionRenderer
Returns the IActionRenderer of current runtime context.- Returns:
-
setLegendLayoutHints
Sets the LegendItemLayoutHints for current context.- Parameters:
lilh-
-
getLegendLayoutHints
Returns the LegendItemLayoutHints for current context.- Returns:
-
setSeriesRenderers
Sets the series renderers for current context.- Parameters:
msr-
-
getSeriesRenderers
Returns the series renderers for current context.- Returns:
-
notifyStructureChange
Notifies the structure definition listener of a change in the current running structure that defines a group of primitives being rendered and puts them into context with reference to the source object.- Parameters:
sEventName- Defines the structure being defined along with the event typeoSource- The source object on which the structure is being defined- Returns:
- 'true' if the structure definition listener exists and was notified of the change or 'false' otherwise.
-
getLocale
Deprecated.usegetULocale()instead.Returns the locale associated with this runtime context.- Returns:
- The locale associated with this runtime context.
-
setLocale
Deprecated.usesetULocale(ULocale)instead.Sets the locale associated with this runtime context. This is usually done when chart generation begins.- Parameters:
lcl- The locale associated with the runtime context.
-
getULocale
public com.ibm.icu.util.ULocale getULocale()Returns the locale associated with this runtime context.- Returns:
- The locale associated with this runtime context.
- Since:
- 2.1
-
setULocale
public void setULocale(com.ibm.icu.util.ULocale lcl) Sets the locale associated with this runtime context. This is usually done when chart generation begins.- Parameters:
lcl- The locale associated with the runtime context.- Since:
- 2.1
-
isRightToLeft
public boolean isRightToLeft()Returns if current context is in a right-left platform. e.g. Arabic, Hebrew.- Returns:
-
setRightToLeft
public void setRightToLeft(boolean value) Sets the right-left mode for current context mandatorily.- Parameters:
value-
-
getResourceHandle
public org.eclipse.birt.core.i18n.ResourceHandle getResourceHandle()Returns an instance of the resource handle for which chart specific messages are externalized.- Returns:
- An instance of the resource handle for which chart specific messages are externalized.
-
setResourceHandle
public void setResourceHandle(org.eclipse.birt.core.i18n.ResourceHandle rh) Specifies a resource handle that facilitates retrieval of chart specific externalized messages.- Parameters:
rh- The resource handle.
-
getScriptHandler
Returns an instance of a transient script handler associated with the chart being generated. The script handler is capable of executing callback scripts defined in the chart model.- Returns:
- An instance of the script handler.
-
setScriptHandler
Sets an instance of a transient script handler associated with the chart being generated. The script handler is capable of executing callback scripts defined in the chart model.- Parameters:
sh- An instance of the script handler.
-
getScriptContext
Returns an instance of a script context associated with the chart being generated.- Returns:
- An instance of the script context.
-
setScriptContext
Sets an instance of a chart script context associated with the chart being generated.- Parameters:
csc- An instance of the chart script context.
-
setMessageLookup
Defines an externalized message lookup implementation per chart model being executed.- Parameters:
iml- The externalized message lookup implementation.
-
externalizedMessage
A convenience method provided to lookup externalized messages associated with a given message key.- Parameters:
sChartKey- The key using which an externalized message is being looked up.- Returns:
- The externalized message associated with the specified key.
-
isSharingQuery
public boolean isSharingQuery() -
setSharingQuery
public void setSharingQuery(boolean isSharingQuery) -
isRightToLeftText
public boolean isRightToLeftText()Returns true if current text reading order is Right To Left- Returns:
-
setRightToLeftText
public void setRightToLeftText(boolean value) Sets the bidi text mode of the current chart object .- Parameters:
value-
-
getResourceFinder
- Returns:
- Returns the resourceFinder.
-
setResourceFinder
- Parameters:
resourceFinder- The resourceFinder to set.
-
getExternalizer
- Returns:
- Returns the externalizer.
-
setExternalizer
- Parameters:
externalizer- The externalizer to set.
-
getState
-
putState
-
setDefaultValueChart
Sets instance of default value chart.- Parameters:
cm-
-
getDefaultValueChart
Returns instance of default value chart.- Returns:
- instance of default value chart.
-
getTimeZone
public com.ibm.icu.util.TimeZone getTimeZone()- Returns:
- Returns the timeZone.
-
setTimeZone
public void setTimeZone(com.ibm.icu.util.TimeZone timeZone) - Parameters:
timeZone- The timeZone to set.
-
enableNonHierarchyCategoryData
public void enableNonHierarchyCategoryData(boolean enabled) -
useNonHierarchyCategoryData
public boolean useNonHierarchyCategoryData()
-
getULocale()instead.