Package org.apache.batik.bridge
Class ScriptingEnvironment.Window
- java.lang.Object
-
- org.apache.batik.bridge.ScriptingEnvironment.Window
-
- Direct Known Subclasses:
SVG12ScriptingEnvironment.Global
- Enclosing class:
- ScriptingEnvironment
protected class ScriptingEnvironment.Window extends java.lang.Object implements Window
Represents the window object of this environment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classScriptingEnvironment.Window.IntervalRunnableTimerTaskATimerTaskto invoke asetInterval()-scheduled function that is specified by aRunnable.protected classScriptingEnvironment.Window.IntervalScriptTimerTaskATimerTaskto invoke asetInterval()-scheduled function that is specified by a String.protected classScriptingEnvironment.Window.TimeoutRunnableTimerTaskATimerTaskto invoke asetTimeout()-scheduled function that is specified by a Runnable.protected classScriptingEnvironment.Window.TimeoutScriptTimerTaskATimerTaskto invoke asetTimeout()-scheduled function that is specified by a String.-
Nested classes/interfaces inherited from interface org.apache.batik.bridge.Window
Window.URLResponseHandler
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.StringDEFLATE(package private) static java.lang.StringGZIPprotected InterpreterinterpreterThe associated interpreter.protected java.lang.StringlanguageThe associated language.protected LocationlocationThe Location object(package private) static java.lang.StringUTF_8
-
Constructor Summary
Constructors Constructor Description Window(Interpreter interp, java.lang.String lang)Creates a new Window for the given language.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalert(java.lang.String message)Displays an alert dialog box.voidclearInterval(java.lang.Object interval)ImplementsWindow.clearInterval(Object).voidclearTimeout(java.lang.Object timeout)ImplementsWindow.clearTimeout(Object).booleanconfirm(java.lang.String message)Displays a confirm dialog box.BridgeContextgetBridgeContext()Returns the current BridgeContext.InterpretergetInterpreter()Returns the associated interpreter.LocationgetLocation()Returns a Location object representing this Window.WindowgetParent()Returns a Window object representing the parent of this Window.voidgetURL(java.lang.String uri, Window.URLResponseHandler h)voidgetURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.String enc)org.w3c.dom.NodeparseXML(java.lang.String text, org.w3c.dom.Document doc)ImplementsWindow.parseXML(String,Document).voidpostURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h)Posts data to the given URI.voidpostURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType)Posts data to the given URI.voidpostURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType, java.lang.String fEnc)Posts data to the given URI.java.lang.StringprintNode(org.w3c.dom.Node n)Serializes the given node.java.lang.Stringprompt(java.lang.String message)Displays an input dialog box.java.lang.Stringprompt(java.lang.String message, java.lang.String defVal)Displays an input dialog box, given the default value.java.lang.ObjectsetInterval(java.lang.Runnable r, long interval)ImplementsWindow.setInterval(Runnable,long).java.lang.ObjectsetInterval(java.lang.String script, long interval)ImplementsWindow.setInterval(String,long).java.lang.ObjectsetTimeout(java.lang.Runnable r, long timeout)ImplementsWindow.setTimeout(Runnable,long).java.lang.ObjectsetTimeout(java.lang.String script, long timeout)ImplementsWindow.setTimeout(String,long).
-
-
-
Field Detail
-
interpreter
protected Interpreter interpreter
The associated interpreter.
-
language
protected java.lang.String language
The associated language.
-
location
protected Location location
The Location object
-
DEFLATE
static final java.lang.String DEFLATE
- See Also:
- Constant Field Values
-
GZIP
static final java.lang.String GZIP
- See Also:
- Constant Field Values
-
UTF_8
static final java.lang.String UTF_8
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Window
public Window(Interpreter interp, java.lang.String lang)
Creates a new Window for the given language.
-
-
Method Detail
-
setInterval
public java.lang.Object setInterval(java.lang.String script, long interval)ImplementsWindow.setInterval(String,long).- Specified by:
setIntervalin interfaceWindow- Returns:
- an object representing the interval created.
-
setInterval
public java.lang.Object setInterval(java.lang.Runnable r, long interval)ImplementsWindow.setInterval(Runnable,long).- Specified by:
setIntervalin interfaceWindow- Returns:
- an object representing the interval created.
-
clearInterval
public void clearInterval(java.lang.Object interval)
ImplementsWindow.clearInterval(Object).- Specified by:
clearIntervalin interfaceWindow
-
setTimeout
public java.lang.Object setTimeout(java.lang.String script, long timeout)ImplementsWindow.setTimeout(String,long).- Specified by:
setTimeoutin interfaceWindow- Returns:
- an object representing the timeout created.
-
setTimeout
public java.lang.Object setTimeout(java.lang.Runnable r, long timeout)ImplementsWindow.setTimeout(Runnable,long).- Specified by:
setTimeoutin interfaceWindow- Returns:
- an object representing the timeout created.
-
clearTimeout
public void clearTimeout(java.lang.Object timeout)
ImplementsWindow.clearTimeout(Object).- Specified by:
clearTimeoutin interfaceWindow
-
parseXML
public org.w3c.dom.Node parseXML(java.lang.String text, org.w3c.dom.Document doc)ImplementsWindow.parseXML(String,Document).
-
printNode
public java.lang.String printNode(org.w3c.dom.Node n)
Serializes the given node.
-
getURL
public void getURL(java.lang.String uri, Window.URLResponseHandler h)
-
getURL
public void getURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.String enc)
-
postURL
public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h)Description copied from interface:WindowPosts data to the given URI.
-
postURL
public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType)Description copied from interface:WindowPosts data to the given URI.
-
postURL
public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType, java.lang.String fEnc)Description copied from interface:WindowPosts data to the given URI.- Specified by:
postURLin interfaceWindow- Parameters:
uri- The URI where the data is located.content- The data to post to the server.h- A handler called when the data is available.mimeType- The mimeType to asscoiate with post.fEnc- The encoding to apply tocontentmay be "gzip", "deflate", ornull.
-
alert
public void alert(java.lang.String message)
Displays an alert dialog box.
-
confirm
public boolean confirm(java.lang.String message)
Displays a confirm dialog box.
-
prompt
public java.lang.String prompt(java.lang.String message)
Displays an input dialog box.
-
prompt
public java.lang.String prompt(java.lang.String message, java.lang.String defVal)Displays an input dialog box, given the default value.
-
getBridgeContext
public BridgeContext getBridgeContext()
Returns the current BridgeContext.- Specified by:
getBridgeContextin interfaceWindow
-
getInterpreter
public Interpreter getInterpreter()
Returns the associated interpreter.- Specified by:
getInterpreterin interfaceWindow
-
getParent
public Window getParent()
Returns a Window object representing the parent of this Window.
-
getLocation
public Location getLocation()
Returns a Location object representing this Window.- Specified by:
getLocationin interfaceWindow
-
-