protected class BaseScriptingEnvironment.Window extends java.lang.Object implements Window
Window.URLResponseHandler
Modifier and Type | Field and Description |
---|---|
protected Interpreter |
interpreter
The associated interpreter.
|
protected java.lang.String |
language
The associated language.
|
Constructor and Description |
---|
Window(Interpreter interp,
java.lang.String lang)
Creates a new Window.
|
Modifier and Type | Method and Description |
---|---|
void |
alert(java.lang.String message)
Displays an alert dialog box.
|
void |
clearInterval(java.lang.Object interval)
Implements
Window.clearInterval(Object) . |
void |
clearTimeout(java.lang.Object timeout)
Implements
Window.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.
|
Node |
parseXML(java.lang.String text,
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(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)
Implements
Window.setInterval(Runnable,long) . |
java.lang.Object |
setInterval(java.lang.String script,
long interval)
Implements
Window.setInterval(String,long) . |
java.lang.Object |
setTimeout(java.lang.Runnable r,
long timeout)
Implements
Window.setTimeout(Runnable,long) . |
java.lang.Object |
setTimeout(java.lang.String script,
long timeout)
Implements
Window.setTimeout(String,long) . |
protected Interpreter interpreter
protected java.lang.String language
public Window(Interpreter interp, java.lang.String lang)
public java.lang.Object setInterval(java.lang.String script, long interval)
Window.setInterval(String,long)
.public java.lang.Object setInterval(java.lang.Runnable r, long interval)
Window.setInterval(Runnable,long)
.public void clearInterval(java.lang.Object interval)
Window.clearInterval(Object)
.public java.lang.Object setTimeout(java.lang.String script, long timeout)
Window.setTimeout(String,long)
.public java.lang.Object setTimeout(java.lang.Runnable r, long timeout)
Window.setTimeout(Runnable,long)
.public void clearTimeout(java.lang.Object timeout)
Window.clearTimeout(Object)
.public Node parseXML(java.lang.String text, Document doc)
public java.lang.String printNode(Node n)
public void getURL(java.lang.String uri, Window.URLResponseHandler h)
uri
- The URI where the data is located.h
- A handler called when the data is available.public void getURL(java.lang.String uri, Window.URLResponseHandler h, java.lang.String enc)
uri
- The URI where the data is located.h
- A handler called when the data is available.enc
- The character encoding of the data.public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h)
Window
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.public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType)
Window
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.public void postURL(java.lang.String uri, java.lang.String content, Window.URLResponseHandler h, java.lang.String mimeType, java.lang.String fEnc)
Window
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 to content
may be "gzip", "deflate", or null
.public void alert(java.lang.String message)
public boolean confirm(java.lang.String message)
public java.lang.String prompt(java.lang.String message)
public java.lang.String prompt(java.lang.String message, java.lang.String defVal)
public BridgeContext getBridgeContext()
public Interpreter getInterpreter()
public Location getLocation()
getLocation
in interface Window
Copyright © 2022 Apache Software Foundation. All Rights Reserved.