public abstract class AbstractScriptHandler<T>
extends org.mozilla.javascript.ScriptableObject
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
AFTER_DATA_SET_FILLED |
static java.lang.String |
AFTER_GENERATION |
static java.lang.String |
AFTER_RENDERING |
static java.lang.String |
BEFORE_DATA_SET_FILLED |
static java.lang.String |
BEFORE_GENERATION |
static java.lang.String |
BEFORE_RENDERING |
| 构造器和说明 |
|---|
AbstractScriptHandler()
The constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.Object |
callFunction(AbstractScriptHandler<?> sh,
java.lang.String sFunction,
java.lang.Object oArg1)
Call JavaScript functions with one argument.
|
static java.lang.Object |
callFunction(AbstractScriptHandler<?> sh,
java.lang.String sFunction,
java.lang.Object oArg1,
java.lang.Object oArg2)
Call JavaScript functions with two arguments.
|
static java.lang.Object |
callFunction(AbstractScriptHandler<?> sh,
java.lang.String sFunction,
java.lang.Object oArg1,
java.lang.Object oArg2,
java.lang.Object oArg3)
Call JavaScript functions with three arguments.
|
java.lang.Object |
evaluate(java.lang.String sScriptContent)
Evaluates the given expression and returns the value.
|
java.lang.String |
getClassName() |
org.mozilla.javascript.Scriptable |
getScope() |
void |
init(org.mozilla.javascript.Scriptable scPrototype)
Initialize the JavaScript context using given parent scope.
|
void |
register(java.lang.String sScriptName,
java.lang.String sScriptContent)
Register the script content for current script handler.
|
void |
registerExistingScriptableObject(org.mozilla.javascript.ScriptableObject so,
java.lang.String sVarName)
Registers an existing scriptable object into current JavaScript context.
|
void |
registerNewScriptableObject(java.lang.Class<? extends org.mozilla.javascript.Scriptable> clsScriptable,
java.lang.String sVarName)
Registers a new scriptable object into current JavaScript context.
|
void |
registerVariable(java.lang.String sVarName,
java.lang.Object var)
Registers a new variable to current JavaScript context.
|
void |
setLocale(com.ibm.icu.util.ULocale lcl)
已过时。
Not used anymore. Use IChartScriptContext to store the locale
now. This is kept for backward compatibility only.
|
void |
setScriptClassLoader(IScriptClassLoader value)
Sets the script class loader.
|
void |
setScriptContext(IScriptContext csc)
Sets the context object of current script handler.
|
void |
unregisterVariable(java.lang.String sVarName)
Unregister a variable from current JavaScript context.
|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, sizepublic static final java.lang.String BEFORE_DATA_SET_FILLED
public static final java.lang.String AFTER_DATA_SET_FILLED
public static final java.lang.String BEFORE_GENERATION
public static final java.lang.String AFTER_GENERATION
public static final java.lang.String BEFORE_RENDERING
public static final java.lang.String AFTER_RENDERING
public final java.lang.String getClassName()
getClassName 在接口中 org.mozilla.javascript.ScriptablegetClassName 在类中 org.mozilla.javascript.ScriptableObjectpublic final org.mozilla.javascript.Scriptable getScope()
public final void setLocale(com.ibm.icu.util.ULocale lcl)
lcl - public final void setScriptClassLoader(IScriptClassLoader value)
value - public final void init(org.mozilla.javascript.Scriptable scPrototype)
throws ChartException
scPrototype - Parent scope object. If it's null, use default scope.ChartExceptionpublic final void registerExistingScriptableObject(org.mozilla.javascript.ScriptableObject so,
java.lang.String sVarName)
throws ChartException
so - The existing scriptable object to be registeredsVarName - The name of the javascript variable associated with the new
scriptable object that will be added to the scopeChartExceptionpublic final void registerNewScriptableObject(java.lang.Class<? extends org.mozilla.javascript.Scriptable> clsScriptable,
java.lang.String sVarName)
throws ChartException
clsScriptable - The class representing the new scriptable object to be
registeredsVarName - The name of the javascript variable associated with the new
scriptable object that will be added to the scopeChartExceptionpublic final void registerVariable(java.lang.String sVarName,
java.lang.Object var)
throws ChartException
sVarName - ChartExceptionpublic final void unregisterVariable(java.lang.String sVarName)
throws ChartException
sVarName - ChartExceptionpublic static final java.lang.Object callFunction(AbstractScriptHandler<?> sh, java.lang.String sFunction, java.lang.Object oArg1) throws ChartException
sh - sFunction - oArg1 - ChartExceptionpublic static final java.lang.Object callFunction(AbstractScriptHandler<?> sh, java.lang.String sFunction, java.lang.Object oArg1, java.lang.Object oArg2) throws ChartException
sh - sFunction - oArg1 - oArg2 - ChartExceptionpublic static final java.lang.Object callFunction(AbstractScriptHandler<?> sh, java.lang.String sFunction, java.lang.Object oArg1, java.lang.Object oArg2, java.lang.Object oArg3) throws ChartException
sh - sFunction - oArg1 - oArg2 - oArg3 - ChartExceptionpublic final java.lang.Object evaluate(java.lang.String sScriptContent)
throws ChartException
sScriptContent - ChartExceptionpublic final void register(java.lang.String sScriptName,
java.lang.String sScriptContent)
throws ChartException
sScriptContent - This is either the JavaSciprt code content or a full class
name which has implemented
IChartItemScriptHandlerChartExceptionpublic void setScriptContext(IScriptContext csc)
csc - Copyright © 2005-2008 Actuate Corp. All rights reserved.