org.apache.batik.script.rhino
Class WindowWrapper

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended byorg.mozilla.javascript.ImporterTopLevel
          extended byorg.apache.batik.script.rhino.WindowWrapper
All Implemented Interfaces:
DebuggableObject, Scriptable, java.io.Serializable

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
 
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, java.lang.Object[] args, Function funObj)
          Wraps the 'alert' method of the Window interface.
static void clearInterval(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'clearInterval' method of the Window interface.
static void clearTimeout(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'clearTimeout' method of the Window interface.
static boolean confirm(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'confirm' method of the Window interface.
 java.lang.String getClassName()
           
static void getURL(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'getURL' method of the Window interface.
static java.lang.Object parseXML(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'parseXML' method of the Window interface.
static java.lang.String prompt(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'prompt' method of the Window interface.
static java.lang.Object setInterval(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'setInterval' methods of the Window interface.
static java.lang.Object setTimeout(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj)
          Wraps the 'setTimeout' methods of the Window interface.
 java.lang.String toString()
           
 
Methods inherited from class org.mozilla.javascript.ImporterTopLevel
get, has, importPackage, initStandardObjects
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowWrapper

public WindowWrapper(Context context)
Creates a new WindowWrapper.

Method Detail

getClassName

public java.lang.String getClassName()

toString

public java.lang.String toString()

setInterval

public static java.lang.Object setInterval(Context cx,
                                           Scriptable thisObj,
                                           java.lang.Object[] args,
                                           Function funObj)
                                    throws JavaScriptException
Wraps the 'setInterval' methods of the Window interface.

Throws:
JavaScriptException

setTimeout

public static java.lang.Object setTimeout(Context cx,
                                          Scriptable thisObj,
                                          java.lang.Object[] args,
                                          Function funObj)
                                   throws JavaScriptException
Wraps the 'setTimeout' methods of the Window interface.

Throws:
JavaScriptException

clearInterval

public static void clearInterval(Context cx,
                                 Scriptable thisObj,
                                 java.lang.Object[] args,
                                 Function funObj)
                          throws JavaScriptException
Wraps the 'clearInterval' method of the Window interface.

Throws:
JavaScriptException

clearTimeout

public static void clearTimeout(Context cx,
                                Scriptable thisObj,
                                java.lang.Object[] args,
                                Function funObj)
                         throws JavaScriptException
Wraps the 'clearTimeout' method of the Window interface.

Throws:
JavaScriptException

parseXML

public static java.lang.Object parseXML(Context cx,
                                        Scriptable thisObj,
                                        java.lang.Object[] args,
                                        Function funObj)
                                 throws JavaScriptException
Wraps the 'parseXML' method of the Window interface.

Throws:
JavaScriptException

getURL

public static void getURL(Context cx,
                          Scriptable thisObj,
                          java.lang.Object[] args,
                          Function funObj)
                   throws JavaScriptException
Wraps the 'getURL' method of the Window interface.

Throws:
JavaScriptException

alert

public static void alert(Context cx,
                         Scriptable thisObj,
                         java.lang.Object[] args,
                         Function funObj)
                  throws JavaScriptException
Wraps the 'alert' method of the Window interface.

Throws:
JavaScriptException

confirm

public static boolean confirm(Context cx,
                              Scriptable thisObj,
                              java.lang.Object[] args,
                              Function funObj)
                       throws JavaScriptException
Wraps the 'confirm' method of the Window interface.

Throws:
JavaScriptException

prompt

public static java.lang.String prompt(Context cx,
                                      Scriptable thisObj,
                                      java.lang.Object[] args,
                                      Function funObj)
                               throws JavaScriptException
Wraps the 'prompt' method of the Window interface.

Throws:
JavaScriptException


Copyright ? 2002 Apache Software Foundation. All Rights Reserved.