org.apache.batik.bridge

Class BaseScriptingEnvironment.Window

protected class BaseScriptingEnvironment.Window extends Object implements Window

Represents the window object of this environment.
Field Summary
protected Interpreterinterpreter
The associated interpreter.
protected Stringlanguage
The associated language.
Constructor Summary
Window(Interpreter interp, String lang)
Creates a new Window.
Method Summary
voidalert(String message)
Displays an alert dialog box.
voidclearInterval(Object interval)
Implements {@link org.apache.batik.script.Window#clearInterval(Object)}.
voidclearTimeout(Object timeout)
Implements {@link org.apache.batik.script.Window#clearTimeout(Object)}.
booleanconfirm(String message)
Displays a confirm dialog box.
BridgeContextgetBridgeContext()
Returns the current BridgeContext.
InterpretergetInterpreter()
Returns the associated interpreter.
voidgetURL(String uri, Window.URLResponseHandler h)
Gets data from the given URI.
voidgetURL(String uri, Window.URLResponseHandler h, String enc)
Gets data from the given URI.
NodeparseXML(String text, Document doc)
Parses the given XML string into a DocumentFragment of the given document or a new document if 'doc' is null.
voidpostURL(String uri, String content, Window.URLResponseHandler h)
voidpostURL(String uri, String content, Window.URLResponseHandler h, String mimeType)
voidpostURL(String uri, String content, Window.URLResponseHandler h, String mimeType, String fEnc)
Stringprompt(String message)
Displays an input dialog box.
Stringprompt(String message, String defVal)
Displays an input dialog box, given the default value.
ObjectsetInterval(String script, long interval)
Implements {@link org.apache.batik.script.Window#setInterval(String,long)}.
ObjectsetInterval(Runnable r, long interval)
Implements {@link org.apache.batik.script.Window#setInterval(Runnable,long)}.
ObjectsetTimeout(String script, long timeout)
Implements {@link org.apache.batik.script.Window#setTimeout(String,long)}.
ObjectsetTimeout(Runnable r, long timeout)
Implements {@link org.apache.batik.script.Window#setTimeout(Runnable,long)}.

Field Detail

interpreter

protected Interpreter interpreter
The associated interpreter.

language

protected String language
The associated language.

Constructor Detail

Window

public Window(Interpreter interp, String lang)
Creates a new Window.

Method Detail

alert

public void alert(String message)
Displays an alert dialog box.

clearInterval

public void clearInterval(Object interval)
Implements {@link org.apache.batik.script.Window#clearInterval(Object)}.

clearTimeout

public void clearTimeout(Object timeout)
Implements {@link org.apache.batik.script.Window#clearTimeout(Object)}.

confirm

public boolean confirm(String message)
Displays a confirm dialog box.

getBridgeContext

public BridgeContext getBridgeContext()
Returns the current BridgeContext.

getInterpreter

public Interpreter getInterpreter()
Returns the associated interpreter.

getURL

public void getURL(String uri, Window.URLResponseHandler h)
Gets data from the given URI.

Parameters: uri The URI where the data is located. h A handler called when the data is available.

getURL

public void getURL(String uri, Window.URLResponseHandler h, String enc)
Gets data from the given URI.

Parameters: uri The URI where the data is located. h A handler called when the data is available. enc The character encoding of the data.

parseXML

public Node parseXML(String text, Document doc)
Parses the given XML string into a DocumentFragment of the given document or a new document if 'doc' is null. The implementation in this class always returns 'null'

Returns: The document/document fragment or null on error.

postURL

public void postURL(String uri, String content, Window.URLResponseHandler h)

postURL

public void postURL(String uri, String content, Window.URLResponseHandler h, String mimeType)

postURL

public void postURL(String uri, String content, Window.URLResponseHandler h, String mimeType, String fEnc)

prompt

public String prompt(String message)
Displays an input dialog box.

prompt

public String prompt(String message, String defVal)
Displays an input dialog box, given the default value.

setInterval

public Object setInterval(String script, long interval)
Implements {@link org.apache.batik.script.Window#setInterval(String,long)}.

setInterval

public Object setInterval(Runnable r, long interval)
Implements {@link org.apache.batik.script.Window#setInterval(Runnable,long)}.

setTimeout

public Object setTimeout(String script, long timeout)
Implements {@link org.apache.batik.script.Window#setTimeout(String,long)}.

setTimeout

public Object setTimeout(Runnable r, long timeout)
Implements {@link org.apache.batik.script.Window#setTimeout(Runnable,long)}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.