Package org.eclipse.birt.chart.script

# Class ScriptHandler

java.lang.Object
org.mozilla.javascript.SlotMapOwner
org.mozilla.javascript.ScriptableObject
org.eclipse.birt.chart.script.AbstractScriptHandler<IChartEventHandler>
org.eclipse.birt.chart.script.ScriptHandler

All Implemented Interfaces:
  `Serializable`, `org.mozilla.javascript.ConstProperties`, `org.mozilla.javascript.debug.DebuggableObject`, `org.mozilla.javascript.Scriptable`, `org.mozilla.javascript.SymbolScriptable`

public final class ScriptHandler extends AbstractScriptHandler<IChartEventHandler>
This class forms the basis of script handling in the charting library. It creates a default scope and/or subclasses from a predefined scope. It also provides convenience methods for execution of functions defined in the scope.

See Also:
  - `IChartEventHandler`
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

`org.mozilla.javascript.ScriptableObject.DescriptorInfo, org.mozilla.javascript.ScriptableObject.KeyComparator, org.mozilla.javascript.ScriptableObject.LambdaGetterFunction, org.mozilla.javascript.ScriptableObject.LambdaSetterFunction`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`AFTER_COMPUTATIONS`
`static final String`
`AFTER_DRAW_AXIS_LABEL`
`static final String`
`AFTER_DRAW_AXIS_TITLE`
`static final String`
`AFTER_DRAW_BLOCK`
`static final String`
`AFTER_DRAW_DATA_POINT`
`static final String`
`AFTER_DRAW_DATA_POINT_LABEL`
`static final String`
`AFTER_DRAW_ELEMENT`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`AFTER_DRAW_FITTING_CURVE`
`static final String`
`AFTER_DRAW_LEGEND_ENTRY`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`AFTER_DRAW_LEGEND_ITEM`
`static final String`
`AFTER_DRAW_MARKER`
`static final String`
`AFTER_DRAW_MARKER_LINE`
`static final String`
`AFTER_DRAW_MARKER_RANGE`
`static final String`
`AFTER_DRAW_SERIES`
`static final String`
`AFTER_DRAW_SERIES_TITLE`
`static final String`
`AFTER_LAYOUT`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`BASE_VALUE`
The pre-defined chart variable name to access base category data.
`static final String`
`BEFORE_COMPUTATIONS`
`static final String`
`BEFORE_DRAW_AXIS_LABEL`
`static final String`
`BEFORE_DRAW_AXIS_TITLE`
`static final String`
`BEFORE_DRAW_BLOCK`
`static final String`
`BEFORE_DRAW_DATA_POINT`
`static final String`
`BEFORE_DRAW_DATA_POINT_LABEL`
`static final String`
`BEFORE_DRAW_ELEMENT`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`BEFORE_DRAW_FITTING_CURVE`
`static final String`
`BEFORE_DRAW_LEGEND_ENTRY`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`BEFORE_DRAW_LEGEND_ITEM`
`static final String`
`BEFORE_DRAW_MARKER`
`static final String`
`BEFORE_DRAW_MARKER_LINE`
`static final String`
`BEFORE_DRAW_MARKER_RANGE`
`static final String`
`BEFORE_DRAW_SERIES`
`static final String`
`BEFORE_DRAW_SERIES_TITLE`
`static final String`
`BEFORE_LAYOUT`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`COMP_LIST`
`static final String`
`FINISH_COMPUTE_SERIES`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`FINISH_GENERATION`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`FINISH_RENDERING`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`ID`
The variable names for highlight and toggle visibility functions.
`static final String`
`LABEL_LIST`
`static final String`
`ORTHOGONAL_VALUE`
The pre-defined chart variable name to access orthogonal value data.
`static final String`
`SERIES_VALUE`
The pre-defined chart variable name to access series name.
`static final String`
`START_COMPUTE_SERIES`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`START_GENERATION`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`START_RENDERING`
Deprecated.
This is kept for backward compatibility only.
`static final String`
`VARIABLE_CATEGORY`
The pre-defined chart variable name to access base category data.
`static final String`
`VARIABLE_SERIES`
The pre-defined chart variable name to access series name.
`static final String`
`VARIABLE_VALUE`
The pre-defined chart variable name to access orthogonal value data.

### Fields inherited from class org.eclipse.birt.chart.script.AbstractScriptHandler

`AFTER_DATA_SET_FILLED, AFTER_GENERATION, AFTER_RENDERING, BEFORE_DATA_SET_FILLED, BEFORE_GENERATION, BEFORE_RENDERING`

### Fields inherited from class org.mozilla.javascript.ScriptableObject

`CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST`

### Fields inherited from interface org.mozilla.javascript.Scriptable

`NOT_FOUND`

## Constructor Summary

Constructors
Constructor
Description
`ScriptHandler()`
The constructor.

## Method Summary

Modifier and Type
Method
Description
`Object`
`jsFunction_clone(Object eo)`
Deprecated.
Note used anymore.
`Object`
`jsFunction_getDesignTimeModel()`
Deprecated.
Not used anymore.
`Object`
`jsFunction_getGeneratedChartState()`
Deprecated.
Not used anymore.
`Object`
`jsFunction_getLocale()`
Deprecated.
Call IChartScriptContext.getLocale() instead.
`Object`
`jsFunction_getRunTimeModel()`
Deprecated.
Call IChartScriptContext.getChartInstance() instead.
`void`
`setDesignTimeModel(Chart cmDesignTime)`
Deprecated.
Not used anymore.
`void`
`setGeneratedChartState(GeneratedChartState gcs)`
Deprecated.
Not used anymore.
`void`
`setRunTimeModel(Chart cmRunTime)`
Deprecated.
Not used anymore.

### Methods inherited from class org.eclipse.birt.chart.script.AbstractScriptHandler

`callFunction, callFunction, callFunction, evaluate, getClassName, getScope, init, register, registerExistingScriptableObject, registerNewScriptableObject, registerVariable, setLocale, setScriptClassLoader, setScriptContext, unregisterVariable`

### Methods inherited from class org.mozilla.javascript.ScriptableObject

`associateValue, avoidObjectDetection, callMethod, callMethod, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### START_GENERATION

@Deprecated public static final String START_GENERATION
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### FINISH_GENERATION

@Deprecated public static final String FINISH_GENERATION
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### BEFORE_LAYOUT

@Deprecated public static final String BEFORE_LAYOUT
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### AFTER_LAYOUT

@Deprecated public static final String AFTER_LAYOUT
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### BEFORE_COMPUTATIONS

public static final String BEFORE_COMPUTATIONS

See Also:
  - Constant Field Values

### AFTER_COMPUTATIONS

public static final String AFTER_COMPUTATIONS

See Also:
  - Constant Field Values

### START_RENDERING

@Deprecated public static final String START_RENDERING
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### FINISH_RENDERING

@Deprecated public static final String FINISH_RENDERING
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### START_COMPUTE_SERIES

@Deprecated public static final String START_COMPUTE_SERIES
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### FINISH_COMPUTE_SERIES

@Deprecated public static final String FINISH_COMPUTE_SERIES
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### BEFORE_DRAW_ELEMENT

@Deprecated public static final String BEFORE_DRAW_ELEMENT
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### AFTER_DRAW_ELEMENT

@Deprecated public static final String AFTER_DRAW_ELEMENT
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### BEFORE_DRAW_BLOCK

public static final String BEFORE_DRAW_BLOCK

See Also:
  - Constant Field Values

### AFTER_DRAW_BLOCK

public static final String AFTER_DRAW_BLOCK

See Also:
  - Constant Field Values

### BEFORE_DRAW_LEGEND_ENTRY

@Deprecated public static final String BEFORE_DRAW_LEGEND_ENTRY
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### AFTER_DRAW_LEGEND_ENTRY

@Deprecated public static final String AFTER_DRAW_LEGEND_ENTRY
Deprecated.
This is kept for backward compatibility only.

See Also:
  - Constant Field Values

### BEFORE_DRAW_LEGEND_ITEM

public static final String BEFORE_DRAW_LEGEND_ITEM

See Also:
  - Constant Field Values

### AFTER_DRAW_LEGEND_ITEM

public static final String AFTER_DRAW_LEGEND_ITEM

See Also:
  - Constant Field Values

### BEFORE_DRAW_SERIES

public static final String BEFORE_DRAW_SERIES

See Also:
  - Constant Field Values

### AFTER_DRAW_SERIES

public static final String AFTER_DRAW_SERIES

See Also:
  - Constant Field Values

### BEFORE_DRAW_SERIES_TITLE

public static final String BEFORE_DRAW_SERIES_TITLE

See Also:
  - Constant Field Values

### AFTER_DRAW_SERIES_TITLE

public static final String AFTER_DRAW_SERIES_TITLE

See Also:
  - Constant Field Values

### BEFORE_DRAW_MARKER

public static final String BEFORE_DRAW_MARKER

See Also:
  - Constant Field Values

### AFTER_DRAW_MARKER

public static final String AFTER_DRAW_MARKER

See Also:
  - Constant Field Values

### BEFORE_DRAW_MARKER_LINE

public static final String BEFORE_DRAW_MARKER_LINE

See Also:
  - Constant Field Values

### AFTER_DRAW_MARKER_LINE

public static final String AFTER_DRAW_MARKER_LINE

See Also:
  - Constant Field Values

### BEFORE_DRAW_MARKER_RANGE

public static final String BEFORE_DRAW_MARKER_RANGE

See Also:
  - Constant Field Values

### AFTER_DRAW_MARKER_RANGE

public static final String AFTER_DRAW_MARKER_RANGE

See Also:
  - Constant Field Values

### BEFORE_DRAW_DATA_POINT

public static final String BEFORE_DRAW_DATA_POINT

See Also:
  - Constant Field Values

### AFTER_DRAW_DATA_POINT

public static final String AFTER_DRAW_DATA_POINT

See Also:
  - Constant Field Values

### BEFORE_DRAW_DATA_POINT_LABEL

public static final String BEFORE_DRAW_DATA_POINT_LABEL

See Also:
  - Constant Field Values

### AFTER_DRAW_DATA_POINT_LABEL

public static final String AFTER_DRAW_DATA_POINT_LABEL

See Also:
  - Constant Field Values

### BEFORE_DRAW_FITTING_CURVE

public static final String BEFORE_DRAW_FITTING_CURVE

See Also:
  - Constant Field Values

### AFTER_DRAW_FITTING_CURVE

public static final String AFTER_DRAW_FITTING_CURVE

See Also:
  - Constant Field Values

### BEFORE_DRAW_AXIS_LABEL

public static final String BEFORE_DRAW_AXIS_LABEL

See Also:
  - Constant Field Values

### AFTER_DRAW_AXIS_LABEL

public static final String AFTER_DRAW_AXIS_LABEL

See Also:
  - Constant Field Values

### BEFORE_DRAW_AXIS_TITLE

public static final String BEFORE_DRAW_AXIS_TITLE

See Also:
  - Constant Field Values

### AFTER_DRAW_AXIS_TITLE

public static final String AFTER_DRAW_AXIS_TITLE

See Also:
  - Constant Field Values

### BASE_VALUE

public static final String BASE_VALUE
The pre-defined chart variable name to access base category data.

See Also:
  - Constant Field Values

### VARIABLE_CATEGORY

public static final String VARIABLE_CATEGORY
The pre-defined chart variable name to access base category data.

See Also:
  - Constant Field Values

### ORTHOGONAL_VALUE

public static final String ORTHOGONAL_VALUE
The pre-defined chart variable name to access orthogonal value data.

See Also:
  - Constant Field Values

### VARIABLE_VALUE

public static final String VARIABLE_VALUE
The pre-defined chart variable name to access orthogonal value data.

See Also:
  - Constant Field Values

### SERIES_VALUE

public static final String SERIES_VALUE
The pre-defined chart variable name to access series name.

See Also:
  - Constant Field Values

### VARIABLE_SERIES

public static final String VARIABLE_SERIES
The pre-defined chart variable name to access series name.

See Also:
  - Constant Field Values

### ID

public static final String ID
The variable names for highlight and toggle visibility functions.

See Also:
  - Constant Field Values

### COMP_LIST

public static final String COMP_LIST

See Also:
  - Constant Field Values

### LABEL_LIST

public static final String LABEL_LIST

See Also:
  - Constant Field Values

## Constructor Details

### ScriptHandler

public ScriptHandler()
The constructor.

## Method Details

### jsFunction_getDesignTimeModel

@Deprecated public Object jsFunction_getDesignTimeModel()
Deprecated.
Not used anymore. This is kept for backward compatibility only.

Returns:
  An instance of the chart model used at design time

### jsFunction_getRunTimeModel

@Deprecated public Object jsFunction_getRunTimeModel()
Deprecated.
Call IChartScriptContext.getChartInstance() instead. This is kept for backward compatibility only.

Returns:
  An instance of the chart model used at run time

### jsFunction_getGeneratedChartState

@Deprecated public Object jsFunction_getGeneratedChartState()
Deprecated.
Not used anymore. This is kept for backward compatibility only.

Returns:
  An instance of the run time model coupled with a computations and series filled with datasets

### jsFunction_getLocale

@Deprecated public Object jsFunction_getLocale()
Deprecated.
Call IChartScriptContext.getLocale() instead. This is kept for backward compatibility only.

Returns:
  The locale associated with the generation request

### jsFunction_clone

@Deprecated public Object jsFunction_clone(Object eo)
Deprecated.
Note used anymore. This is kept for backward compatibility only.

Parameters:
  `eo` - An EMF generated model object to be cloned
Returns:
  A cloned instance of the specified EMF generated model object

### setDesignTimeModel

@Deprecated public void setDesignTimeModel(Chart cmDesignTime)
Deprecated.
Not used anymore. This is kept for backward compatibility only.

Parameters:
  `cm` -

### setRunTimeModel

@Deprecated public void setRunTimeModel(Chart cmRunTime)
Deprecated.
Not used anymore. Use IChartScriptContext to store the run-time model now. This is kept for backward compatibility only.

Parameters:
  `cm` -

### setGeneratedChartState

@Deprecated public void setGeneratedChartState(GeneratedChartState gcs)
Deprecated.
Not used anymore. This is kept for backward compatibility only.

Parameters:
  `gcs` -