|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.jrex.navigation.WebNavigationImpl
Class implementing WebNavigation interface.
Constructor Summary | |
WebNavigationImpl()
|
Method Summary | |
boolean |
canGoBack()
Indicates if the object can go back. |
boolean |
canGoForward()
Indicates if the object can go forward. |
String |
getContentString(String contType,
int outFlag)
Returns the string representation of loaded Content. |
URI |
getCurrentURI()
Get the currently loaded URI or null. |
Document |
getDocument()
Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none. |
URI |
getReferringURI()
Get the referring URI for the current open page. |
History |
getSessionHistory()
Get the session history object used to store the session history for the session. |
boolean |
goBack()
Tells the object to navigate to the previous session history item. |
boolean |
goForward()
Tells the object to navigate to the next Forward session history item. |
void |
goToAnchor(String anchorName,
boolean shouldScroll)
Informs the pres shell that the document is now at the anchor with the given name. |
boolean |
goToIndex(int index)
Tells the object to navigate to the session history item at index. |
void |
loadStream(InputStream inStream,
String uri,
String contentType,
String charset,
int loadFlags,
String referURI,
Object owner,
boolean inheritOwner,
String target,
InputStream postData,
InputStream headers)
Loads a given stream. |
void |
loadURI(String uri,
int loadFlags,
String referrer,
InputStream postData,
InputStream headers)
Loads a given URI. |
void |
loadURI(URI uri,
int loadFlags,
URI referrer,
InputStream postData,
InputStream headers)
Loads a given URI. |
void |
openWindow(short type,
String uri,
String referrer,
String windowName,
String features)
Open a new window. |
void |
reload(int reloadFlags)
Tells the Object to reload the current page. |
void |
setJRexPeer(int jrexPeer)
The peer JREX Window on which to navigate |
void |
setSessionHistory(History his)
Set the session history object used to store the session history for the session. |
void |
stop(int stopFlags)
Stops a load of a URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WebNavigationImpl()
Method Detail |
public void setJRexPeer(int jrexPeer)
WebNavigation
setJRexPeer
in interface WebNavigation
jrexPeer
- jrex peer window associated with browser componentpublic boolean canGoBack() throws JRexException
WebNavigation
canGoBack
in interface WebNavigation
JRexException
public boolean canGoForward() throws JRexException
WebNavigation
canGoForward
in interface WebNavigation
JRexException
public boolean goBack() throws JRexException
WebNavigation
goBack
in interface WebNavigation
JRexException
public boolean goForward() throws JRexException
WebNavigation
goForward
in interface WebNavigation
JRexException
public boolean goToIndex(int index) throws JRexException
WebNavigation
goToIndex
in interface WebNavigation
JRexException
public void loadURI(URI uri, int loadFlags, URI referrer, InputStream postData, InputStream headers) throws JRexException
WebNavigation
loadURI
in interface WebNavigation
uri
- The URI string to load.loadFlags
- Flags modifying load behaviour. Generally you will pass
LOAD_FLAGS_NONE for this parameter.referrer
- The referring URI. If this argument is NULL, the
referring URI will be inferred internally.postData
- InputStream containing POST data for the request.headers
- InputStream containing POST headers for the request.
JRexException
WebNavigationConstants
public void loadURI(String uri, int loadFlags, String referrer, InputStream postData, InputStream headers) throws JRexException
WebNavigation
loadURI
in interface WebNavigation
uri
- The URI string to load.loadFlags
- Flags modifying load behaviour. Generally you will pass
LOAD_FLAGS_NONE for this parameter.referrer
- The referring URI. If this argument is NULL, the
referring URI will be inferred internally.postData
- InputStream containing POST data for the request.headers
- InputStream containing POST headers for the request.
JRexException
public void loadStream(InputStream inStream, String uri, String contentType, String charset, int loadFlags, String referURI, Object owner, boolean inheritOwner, String target, InputStream postData, InputStream headers) throws JRexException
WebNavigation
loadStream
in interface WebNavigation
inStream
- The input stream that provides access to the data to be loaded.
This must be a blocking stream.uri
- The URI representing the stream, or null
contentType
- The type (MIME) of data being loaded, null
if unknown.charset
- The charset of the data being loaded, null
if unknown.loadFlags
- Flags to modify load behaviour. Flags are defined in WebNavigationConstants
Use loadStream() specific flags.referURI
- The referring URI for the load.owner
- Owner (security principal), for now it is just a place holder, set it to null
.inheritOwner
- If true owner inherits the owner from the referring document.target
- Target for load, like _content, _blank etc.postData
- InputStream containing POST data for the request.headers
- InputStream containing POST headers for the request.
JRexException
public void openWindow(short type, String uri, String referrer, String windowName, String features) throws JRexException
WebNavigation
openWindow
in interface WebNavigation
type
- the type of windowuri
- to which to open the new window. Must already be
escaped if applicable. can be null.referrer
- the refence uri to be used.windowName
- window name from JS window.open. can be null.features
- window features from JS window.open. can be null.
Note:- The window attached to this navigator will be parent.
JRexException
WebNavigationConstants
public void reload(int reloadFlags) throws JRexException
WebNavigation
reload
in interface WebNavigation
reloadFlags
- - Flags modifying reload behaviour. Generally you will
pass LOAD_FLAGS_NONE for this parameter.
JRexException
public void goToAnchor(String anchorName, boolean shouldScroll) throws JRexException
WebNavigation
goToAnchor
in interface WebNavigation
anchorName
- the name of the new anchor tag for the current documentshouldScroll
- specifies whether or not to scroll the anchor to the top of
the window.
JRexException
public String getContentString(String contType, int outFlag) throws JRexException
WebNavigation
getContentString
in interface WebNavigation
contType
- The Content type to be used.outFlag
- specifies how the content should be converted to string,
JRexException
WebNavigationConstants
public void stop(int stopFlags) throws JRexException
WebNavigation
stop
in interface WebNavigation
stopFlags
- - Flags indicating the stop behavior.
JRexException
public Document getDocument() throws JRexException
WebNavigation
getDocument
in interface WebNavigation
JRexException
public URI getCurrentURI() throws JRexException
WebNavigation
getCurrentURI
in interface WebNavigation
JRexException
public URI getReferringURI() throws JRexException
WebNavigation
getReferringURI
in interface WebNavigation
JRexException
public History getSessionHistory() throws JRexException
WebNavigation
getSessionHistory
in interface WebNavigation
JRexException
public void setSessionHistory(History his) throws JRexException
WebNavigation
setSessionHistory
in interface WebNavigation
his
- - The Session history object.
JRexException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |