Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.script.rhino
Class WindowWrapper

    java.lang.Object
      org.mozilla.javascript.ScriptableObject
          org.mozilla.javascript.IdScriptableObject
              org.mozilla.javascript.ImporterTopLevel
                  org.apache.batik.script.rhino.WindowWrapper

All Implemented Interfaces:
  Serializable, DebuggableObject, IdFunctionCall, Scriptable

Direct Known Subclasses:
  GlobalWrapper

    public class WindowWrapper

extends ImporterTopLevel

This class wraps a Window object to expose it to the interpreter. This will be the Global Object of our interpreter.

See Also:
  Serialized Form

Nested Class Summary
`protected static class` | `WindowWrapper.FunctionWrapper` To wrap a function in an handler.
`protected static class` | `WindowWrapper.GetURLFunctionWrapper` To wrap a function passed to getURL().

Field Summary
`protected RhinoInterpreter` | `interpreter` The rhino interpreter.
`protected Window` | `window` The wrapped window.

Fields inherited from class org.mozilla.javascript.ScriptableObject
`DONTENUM, EMPTY, PERMANENT, READONLY`

Fields inherited from interface org.mozilla.javascript.Scriptable
`NOT_FOUND`

Constructor Summary
`WindowWrapper(Context context)` Creates a new WindowWrapper.

Method Summary
`static void` | `alert(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'alert' method of the Window interface.
`static void` | `clearInterval(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'clearInterval' method of the Window interface.
`static void` | `clearTimeout(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'clearTimeout' method of the Window interface.
`static Object` | `confirm(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'confirm' method of the Window interface.
`String` | `getClassName()`
`static void` | `getURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'getURL' method of the Window interface.
`static Object` | `parseXML(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'parseXML' method of the Window interface.
`static void` | `postURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'postURL' method of the Window interface.
`static Object` | `prompt(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'prompt' method of the Window interface.
`static Object` | `setInterval(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'setInterval' methods of the Window interface.
`static Object` | `setTimeout(Context cx, Scriptable thisObj, Object[] args, Function funObj)` Wraps the 'setTimeout' methods of the Window interface.
`String` | `toString()`

Methods inherited from class org.mozilla.javascript.ImporterTopLevel
`execIdCall, findPrototypeId, get, has, importPackage, init, initPrototypeId, initStandardObjects`

Methods inherited from class org.mozilla.javascript.IdScriptableObject
`activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdValue`

Methods inherited from class org.mozilla.javascript.ScriptableObject
`associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isSealed, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setAttributes, setParentScope, setPrototype`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### interpreter

    protected RhinoInterpreter interpreter

  The rhino interpreter.

### window

    protected Window window

  The wrapped window.

Constructor Detail

### WindowWrapper

    public WindowWrapper(Context context)

  Creates a new WindowWrapper.

Method Detail

### getClassName

    public String getClassName()

  Specified by:
    `getClassName` in interface `Scriptable`
  Overrides:
    `getClassName` in class `ImporterTopLevel`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### setInterval

    public static Object setInterval(Context cx,
                                     Scriptable thisObj,
                                     Object[] args,
                                     Function funObj)

  Wraps the 'setInterval' methods of the Window interface.

### setTimeout

    public static Object setTimeout(Context cx,
                                    Scriptable thisObj,
                                    Object[] args,
                                    Function funObj)

  Wraps the 'setTimeout' methods of the Window interface.

### clearInterval

    public static void clearInterval(Context cx,
                                     Scriptable thisObj,
                                     Object[] args,
                                     Function funObj)

  Wraps the 'clearInterval' method of the Window interface.

### clearTimeout

    public static void clearTimeout(Context cx,
                                    Scriptable thisObj,
                                    Object[] args,
                                    Function funObj)

  Wraps the 'clearTimeout' method of the Window interface.

### parseXML

    public static Object parseXML(Context cx,
                                  Scriptable thisObj,
                                  Object[] args,
                                  Function funObj)

  Wraps the 'parseXML' method of the Window interface.

### getURL

    public static void getURL(Context cx,
                              Scriptable thisObj,
                              Object[] args,
                              Function funObj)

  Wraps the 'getURL' method of the Window interface.

### postURL

    public static void postURL(Context cx,
                               Scriptable thisObj,
                               Object[] args,
                               Function funObj)

  Wraps the 'postURL' method of the Window interface.

### alert

    public static void alert(Context cx,
                             Scriptable thisObj,
                             Object[] args,
                             Function funObj)

  Wraps the 'alert' method of the Window interface.

### confirm

    public static Object confirm(Context cx,
                                 Scriptable thisObj,
                                 Object[] args,
                                 Function funObj)

  Wraps the 'confirm' method of the Window interface.

### prompt

    public static Object prompt(Context cx,
                                Scriptable thisObj,
                                Object[] args,
                                Function funObj)

  Wraps the 'prompt' method of the Window interface.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.