Package org.apache.batik.bridge
Class WindowWrapper
- java.lang.Object
-
- org.mozilla.javascript.ScriptableObject
-
- org.mozilla.javascript.IdScriptableObject
-
- org.mozilla.javascript.TopLevel
-
- org.mozilla.javascript.ImporterTopLevel
-
- org.apache.batik.bridge.WindowWrapper
-
- All Implemented Interfaces:
java.io.Serializable,org.mozilla.javascript.ConstProperties,org.mozilla.javascript.debug.DebuggableObject,org.mozilla.javascript.IdFunctionCall,org.mozilla.javascript.Scriptable
- Direct Known Subclasses:
GlobalWrapper
public class WindowWrapper extends org.mozilla.javascript.ImporterTopLevelThis class wraps a Window object to expose it to the interpreter. This will be the Global Object of our interpreter.- Version:
- $Id: WindowWrapper.java 1830543 2018-04-30 10:17:31Z ssteiner $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classWindowWrapper.FunctionWrapperTo wrap a function in an handler.(package private) static classWindowWrapper.GetURLDoneArgBuilderprotected static classWindowWrapper.GetURLFunctionWrapperTo wrap a function passed to getURL().private static classWindowWrapper.GetURLObjectWrapperTo wrap an object passed to getURL().
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Object[]EMPTY_ARGUMENTSprotected RhinoInterpreterinterpreterThe rhino interpreter.protected WindowwindowThe wrapped window.
-
Constructor Summary
Constructors Constructor Description WindowWrapper(org.mozilla.javascript.Context context)Creates a new WindowWrapper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidalert(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'alert' method of the Window interface.static voidclearInterval(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'clearInterval' method of the Window interface.static voidclearTimeout(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'clearTimeout' method of the Window interface.static java.lang.Objectconfirm(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'confirm' method of the Window interface.java.lang.StringgetClassName()LocationgetLocation()Return the Location for this Window.static voidgetURL(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'getURL' method of the Window interface.static java.lang.ObjectparseXML(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'parseXML' method of the Window interface.static voidpostURL(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'postURL' method of the Window interface.static java.lang.ObjectprintNode(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'printNode' method of the Window interface.static java.lang.Objectprompt(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'prompt' method of the Window interface.static java.lang.ObjectsetInterval(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'setInterval' methods of the Window interface.voidsetLocation(java.lang.Object val)Return the Location for this Window.static java.lang.ObjectsetTimeout(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'setTimeout' methods of the Window interface.java.lang.StringtoString()-
Methods inherited from class org.mozilla.javascript.ImporterTopLevel
execIdCall, findPrototypeId, get, has, importPackage, init, initPrototypeId, initStandardObjects
-
Methods inherited from class org.mozilla.javascript.TopLevel
cacheBuiltins, getBuiltinCtor, getBuiltinCtor, getBuiltinPrototype, getBuiltinPrototype
-
Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdAttributes, setInstanceIdValue
-
Methods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
-
-
-
Field Detail
-
EMPTY_ARGUMENTS
private static final java.lang.Object[] EMPTY_ARGUMENTS
-
interpreter
protected RhinoInterpreter interpreter
The rhino interpreter.
-
window
protected Window window
The wrapped window.
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
- Specified by:
getClassNamein interfaceorg.mozilla.javascript.Scriptable- Overrides:
getClassNamein classorg.mozilla.javascript.ImporterTopLevel
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setInterval
public static java.lang.Object setInterval(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'setInterval' methods of the Window interface.
-
setTimeout
public static java.lang.Object setTimeout(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'setTimeout' methods of the Window interface.
-
clearInterval
public static void clearInterval(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'clearInterval' method of the Window interface.
-
clearTimeout
public static void clearTimeout(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'clearTimeout' method of the Window interface.
-
parseXML
public static java.lang.Object parseXML(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'parseXML' method of the Window interface.
-
printNode
public static java.lang.Object printNode(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'printNode' method of the Window interface.
-
getURL
public static void getURL(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'getURL' method of the Window interface.
-
postURL
public static void postURL(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'postURL' method of the Window interface.
-
alert
public static void alert(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'alert' method of the Window interface.
-
confirm
public static java.lang.Object confirm(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'confirm' method of the Window interface.
-
prompt
public static java.lang.Object prompt(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)Wraps the 'prompt' method of the Window interface.
-
getLocation
public Location getLocation()
Return the Location for this Window.
-
setLocation
public void setLocation(java.lang.Object val)
Return the Location for this Window.
-
-