org.apache.batik.script.rhino
Class WindowWrapper

java.lang.Object
  |
  +--org.mozilla.javascript.ScriptableObject
        |
        +--org.mozilla.javascript.ImporterTopLevel
              |
              +--org.apache.batik.script.rhino.WindowWrapper
All Implemented Interfaces:
org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, java.io.Serializable

public class WindowWrapper
extends org.mozilla.javascript.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

Inner 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().
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
WindowWrapper(org.mozilla.javascript.Context context)
          Creates a new WindowWrapper.
 
Method Summary
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.
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.
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.
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.
 java.lang.String getClassName()
           
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.
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.
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.
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.
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.
 java.lang.String toString()
           
 
Methods inherited from class org.mozilla.javascript.ImporterTopLevel
get, has, importClass, importPackage
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, 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, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowWrapper

public WindowWrapper(org.mozilla.javascript.Context context)
Creates a new WindowWrapper.
Method Detail

getClassName

public java.lang.String getClassName()
Overrides:
getClassName in class org.mozilla.javascript.ImporterTopLevel

toString

public java.lang.String toString()
Overrides:
toString in class java.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)
                                    throws org.mozilla.javascript.JavaScriptException
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)
                                   throws org.mozilla.javascript.JavaScriptException
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)
                          throws org.mozilla.javascript.JavaScriptException
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)
                         throws org.mozilla.javascript.JavaScriptException
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)
                                 throws org.mozilla.javascript.JavaScriptException
Wraps the 'parseXML' 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)
                   throws org.mozilla.javascript.JavaScriptException
Wraps the 'getURL' 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)
                  throws org.mozilla.javascript.JavaScriptException
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)
                                throws org.mozilla.javascript.JavaScriptException
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)
                               throws org.mozilla.javascript.JavaScriptException
Wraps the 'prompt' method of the Window interface.


Copyright © 2004 Apache Software Foundation. All Rights Reserved.