Package org.apache.batik.bridge
Interface Window
-
- All Superinterfaces:
Window
- All Known Implementing Classes:
BaseScriptingEnvironment.Window,ScriptingEnvironment.Window,SVG12ScriptingEnvironment.Global
public interface Window extends Window
This interface represents the 'window' object defined in the global environment of a SVG document.- Version:
- $Id: Window.java 1830543 2018-04-30 10:17:31Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceWindow.URLResponseHandlerTo handle the completion of a 'getURL()' or 'postURL' call.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidalert(java.lang.String message)Displays an alert dialog box.voidclearInterval(java.lang.Object interval)Cancels an interval that was set by a call to 'setInterval'.voidclearTimeout(java.lang.Object timeout)Cancels an timeout that was set by a call to 'setTimeout'.booleanconfirm(java.lang.String message)Displays a confirm dialog box.BridgeContextgetBridgeContext()Returns the current BridgeContext.InterpretergetInterpreter()Returns the associated interpreter.voidgetURL(java.lang.String uri, Window.URLResponseHandler h)Gets data from the given URI.voidgetURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.String enc)Gets data from the given URI.org.w3c.dom.NodeparseXML(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.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 enc)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)Calls the 'run' method of the given Runnable repeatedly after the given amount of time.java.lang.ObjectsetInterval(java.lang.String script, long interval)Evaluates the given string repeatedly after the given amount of time.java.lang.ObjectsetTimeout(java.lang.Runnable r, long timeout)Calls the 'run' method of the given Runnable after the given amount of time.java.lang.ObjectsetTimeout(java.lang.String script, long timeout)Evaluates the given string after the given amount of time.-
Methods inherited from interface org.apache.batik.w3c.dom.Window
getLocation, getParent
-
-
-
-
Method Detail
-
setInterval
java.lang.Object setInterval(java.lang.String script, long interval)Evaluates the given string repeatedly after the given amount of time. This method does not stall the script: the evaluation is scheduled and the script continues its execution.- Returns:
- an object representing the interval created.
-
setInterval
java.lang.Object setInterval(java.lang.Runnable r, long interval)Calls the 'run' method of the given Runnable repeatedly after the given amount of time. This method does not stall the script: the evaluation is scheduled and the script continues its execution.- Returns:
- an object representing the interval created.
-
clearInterval
void clearInterval(java.lang.Object interval)
Cancels an interval that was set by a call to 'setInterval'.
-
setTimeout
java.lang.Object setTimeout(java.lang.String script, long timeout)Evaluates the given string after the given amount of time. This method does not stall the script: the evaluation is scheduled and the script continues its execution.- Returns:
- an object representing the timeout created.
-
setTimeout
java.lang.Object setTimeout(java.lang.Runnable r, long timeout)Calls the 'run' method of the given Runnable after the given amount of time. This method does not stall the script: the evaluation is scheduled and the script continues its execution.- Returns:
- an object representing the timeout created.
-
clearTimeout
void clearTimeout(java.lang.Object timeout)
Cancels an timeout that was set by a call to 'setTimeout'.
-
parseXML
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.- Returns:
- The document fragment or null on error.
-
printNode
java.lang.String printNode(org.w3c.dom.Node n)
Serializes the given node.
-
getURL
void getURL(java.lang.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
void getURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.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.
-
postURL
void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h)Posts data to the given URI.- 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.
-
postURL
void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType)Posts data to the given URI.- 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.
-
postURL
void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType, java.lang.String enc)Posts data to the given URI.- 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.enc- The encoding to apply tocontentmay be "gzip", "deflate", ornull.
-
alert
void alert(java.lang.String message)
Displays an alert dialog box.
-
confirm
boolean confirm(java.lang.String message)
Displays a confirm dialog box.
-
prompt
java.lang.String prompt(java.lang.String message)
Displays an input dialog box.- Returns:
- The input of the user, or null if the dialog was cancelled.
-
prompt
java.lang.String prompt(java.lang.String message, java.lang.String defVal)Displays an input dialog box, given the default value.- Returns:
- The input of the user, or null if the dialog was cancelled.
-
getBridgeContext
BridgeContext getBridgeContext()
Returns the current BridgeContext. This object given a deep access to the viewer internals.
-
getInterpreter
Interpreter getInterpreter()
Returns the associated interpreter.
-
-