Package org.apache.batik.bridge
Class BaseScriptingEnvironment.Window
- java.lang.Object
-
- org.apache.batik.bridge.BaseScriptingEnvironment.Window
-
- Enclosing class:
- BaseScriptingEnvironment
protected class BaseScriptingEnvironment.Window extends java.lang.Object implements Window
Represents the window object of this environment.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.batik.bridge.Window
Window.URLResponseHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Interpreter
interpreter
The associated interpreter.protected java.lang.String
language
The associated language.
-
Constructor Summary
Constructors Constructor Description Window(Interpreter interp, java.lang.String lang)
Creates a new Window.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alert(java.lang.String message)
Displays an alert dialog box.void
clearInterval(java.lang.Object interval)
ImplementsWindow.clearInterval(Object)
.void
clearTimeout(java.lang.Object timeout)
ImplementsWindow.clearTimeout(Object)
.boolean
confirm(java.lang.String message)
Displays a confirm dialog box.BridgeContext
getBridgeContext()
Returns the current BridgeContext.Interpreter
getInterpreter()
Returns the associated interpreter.Location
getLocation()
Returns the Location.Window
getParent()
Returns the parent Window object.void
getURL(java.lang.String uri, Window.URLResponseHandler h)
Gets data from the given URI.void
getURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.String enc)
Gets data from the given URI.org.w3c.dom.Node
parseXML(java.lang.String text, org.w3c.dom.Document doc)
Parses the given XML string into a DocumentFragment of the given document or a new document if 'doc' is null.void
postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h)
Posts data to the given URI.void
postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType)
Posts data to the given URI.void
postURL(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.String
printNode(org.w3c.dom.Node n)
Serializes the given node.java.lang.String
prompt(java.lang.String message)
Displays an input dialog box.java.lang.String
prompt(java.lang.String message, java.lang.String defVal)
Displays an input dialog box, given the default value.java.lang.Object
setInterval(java.lang.Runnable r, long interval)
ImplementsWindow.setInterval(Runnable,long)
.java.lang.Object
setInterval(java.lang.String script, long interval)
ImplementsWindow.setInterval(String,long)
.java.lang.Object
setTimeout(java.lang.Runnable r, long timeout)
ImplementsWindow.setTimeout(Runnable,long)
.java.lang.Object
setTimeout(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.
-
-
Constructor Detail
-
Window
public Window(Interpreter interp, java.lang.String lang)
Creates a new Window.
-
-
Method Detail
-
setInterval
public java.lang.Object setInterval(java.lang.String script, long interval)
ImplementsWindow.setInterval(String,long)
.- Specified by:
setInterval
in 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:
setInterval
in interfaceWindow
- Returns:
- an object representing the interval created.
-
clearInterval
public void clearInterval(java.lang.Object interval)
ImplementsWindow.clearInterval(Object)
.- Specified by:
clearInterval
in interfaceWindow
-
setTimeout
public java.lang.Object setTimeout(java.lang.String script, long timeout)
ImplementsWindow.setTimeout(String,long)
.- Specified by:
setTimeout
in 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:
setTimeout
in interfaceWindow
- Returns:
- an object representing the timeout created.
-
clearTimeout
public void clearTimeout(java.lang.Object timeout)
ImplementsWindow.clearTimeout(Object)
.- Specified by:
clearTimeout
in interfaceWindow
-
parseXML
public org.w3c.dom.Node parseXML(java.lang.String text, org.w3c.dom.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'
-
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)
Gets data from the given URI.
-
getURL
public void getURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.String enc)
Gets data from the given URI.
-
postURL
public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h)
Description copied from interface:Window
Posts 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:Window
Posts 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:Window
Posts data to the given URI.- Specified by:
postURL
in 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 tocontent
may 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:
getBridgeContext
in interfaceWindow
-
getInterpreter
public Interpreter getInterpreter()
Returns the associated interpreter.- Specified by:
getInterpreter
in interfaceWindow
-
getLocation
public Location getLocation()
Returns the Location.- Specified by:
getLocation
in interfaceWindow
-
-