org.apache.batik.script.rhino

Class WindowWrapper

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.
Nested Class Summary
protected static classWindowWrapper.FunctionWrapper
To wrap a function in an handler.
protected static classWindowWrapper.GetURLFunctionWrapper
To wrap a function passed to getURL().
Field Summary
protected RhinoInterpreterinterpreter
The rhino interpreter.
protected Windowwindow
The wrapped window.
Constructor Summary
WindowWrapper(Context context)
Creates a new WindowWrapper.
Method Summary
static voidalert(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'alert' method of the Window interface.
static voidclearInterval(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'clearInterval' method of the Window interface.
static voidclearTimeout(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'clearTimeout' method of the Window interface.
static Objectconfirm(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'confirm' method of the Window interface.
StringgetClassName()
static voidgetURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'getURL' method of the Window interface.
static ObjectparseXML(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'parseXML' method of the Window interface.
static voidpostURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'postURL' method of the Window interface.
static Objectprompt(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'prompt' method of the Window interface.
static ObjectsetInterval(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'setInterval' methods of the Window interface.
static ObjectsetTimeout(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'setTimeout' methods of the Window interface.
StringtoString()

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

alert

public static void alert(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'alert' method 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.

confirm

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

getClassName

public String getClassName()

getURL

public static void getURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'getURL' 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.

postURL

public static void postURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)
Wraps the 'postURL' 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.

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.

toString

public String toString()
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.