|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NavigatorFrame
Represents a navigator frame. In many ways this interface parallels the JavaScript "Window" object.
| Method Summary | |
|---|---|
void |
alert(java.lang.String message)
Opens an alert dialog. |
boolean |
back()
|
boolean |
canBack()
|
boolean |
canForward()
|
void |
closeWindow()
Closes the current window, if allowed. |
boolean |
confirm(java.lang.String message)
Opens a Yes/No confirmation dialog. |
NavigatorFrame |
createFrame()
|
NetworkRequest |
createNetworkRequest()
Creates a NetworkRequest object that can be used
to load data over HTTP and other network protocols. |
boolean |
forward()
|
java.awt.Component |
getComponent()
Gets a component for the current frame which could be serve as the parent of pop-up dialogs. |
ComponentContent |
getComponentContent()
Gets the component content currently set in the frame. |
NavigationEntry |
getCurrentNavigationEntry()
Gets an object that represents the current navigation entry in the frame's history. |
java.lang.String |
getDefaultStatus()
|
int |
getHistoryLength()
Gets the length for the frame's history. |
NavigationEntry |
getNextNavigationEntry()
|
NavigatorFrame |
getOpenerFrame()
|
NavigatorFrame |
getParentFrame()
Gets the frame that contains the current one, if any. |
NavigationEntry |
getPreviousNavigationEntry()
|
NavigatorProgressEvent |
getProgressEvent()
Gets the most recent progress event. |
java.lang.String |
getSourceCode()
Gets source code for content currently showing, if any. |
java.lang.String |
getStatus()
|
NavigatorFrame |
getTopFrame()
Gets the top-most frame in the window. |
java.lang.String |
getWindowId()
|
void |
invokeLater(java.lang.Runnable runnable)
Executes a task later in the event dispatch thread. |
boolean |
isWindowClosed()
|
void |
linkClicked(java.net.URL url,
TargetType targetType,
java.lang.Object linkObject)
Similar to navigate(java.net.URL, String, ParameterInfo, TargetType, RequestType),
except this method should be called when navigation is triggered by a user click. |
void |
moveInHistory(int offset)
Switches to a new navigation entry in the frame's history, according to the given offset. |
void |
navigate(java.lang.String urlOrPath)
Navigates to a URL in the current frame. |
void |
navigate(java.lang.String urlOrPath,
RequestType requestType)
Navigates to a URL in the current frame. |
void |
navigate(java.net.URL url)
Navigates to a URL in the current frame. |
void |
navigate(java.net.URL url,
RequestType requestType)
Navigates to a URL in the current frame. |
void |
navigate(java.net.URL url,
java.lang.String method,
ParameterInfo paramInfo,
TargetType targetType,
RequestType requestType)
Navigates to a URL in the current frame. |
void |
navigate(java.net.URL url,
java.lang.String method,
ParameterInfo paramInfo,
TargetType targetType,
RequestType requestType,
NavigatorFrame originatingFrame)
Navigates to a URL in the current frame. |
void |
navigateInHistory(java.lang.String absoluteURL)
Navigates to a URL that exists in the frame's history. |
NavigatorFrame |
open(java.lang.String urlOrPath)
Opens a URL in a separate window. |
NavigatorFrame |
open(java.net.URL url)
Opens a URL in a separate window. |
NavigatorFrame |
open(java.net.URL url,
java.util.Properties windowProperties)
Opens a URL in a separate window using the properties provided. |
NavigatorFrame |
open(java.net.URL url,
java.lang.String method,
ParameterInfo pinfo)
Opens a URL in a separate window. |
NavigatorFrame |
open(java.net.URL url,
java.lang.String method,
ParameterInfo pinfo,
java.lang.String windowId,
java.util.Properties windowProperties)
Opens a URL in a separate window. |
java.lang.String |
prompt(java.lang.String message,
java.lang.String inputDefault)
Opens a prompt dialog. |
void |
reload()
|
void |
replaceContent(ClientletResponse response,
ComponentContent component)
Replaces the content of the frame. |
void |
replaceContent(java.awt.Component component)
A simple alternative to replaceContent(org.lobobrowser.clientlet.ClientletResponse, org.lobobrowser.clientlet.ComponentContent)
provided for convenience. |
void |
resizeWindowBy(int byWidth,
int byHeight)
Resizes the browser window. |
void |
resizeWindowTo(int width,
int height)
Resizes the browser window. |
void |
setDefaultStatus(java.lang.String value)
|
void |
setProgressEvent(NavigatorProgressEvent event)
Requests the frame to update its progress state. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets an implementation-dependent property of the underlying component currently rendered. |
void |
setStatus(java.lang.String status)
|
void |
windowToBack()
Sends the window of this clientlet context to the back and may cause it to lose focus. |
void |
windowToFront()
Sends the window of this clientlet context to the front and may cause it to request focus. |
| Method Detail |
|---|
NavigatorFrame open(java.lang.String urlOrPath)
throws java.net.MalformedURLException
urlOrPath - The absolute URL or file path to open.
java.net.MalformedURLExceptionNavigatorFrame open(java.net.URL url)
url - The URL to open.
NavigatorFrame open(java.net.URL url,
java.util.Properties windowProperties)
throws java.net.MalformedURLException
url - The URL to open.windowProperties - Window properties, following Javascript Window.open() conventions.
java.net.MalformedURLException
NavigatorFrame open(java.net.URL url,
java.lang.String method,
ParameterInfo pinfo,
java.lang.String windowId,
java.util.Properties windowProperties)
windowProperties - Window properties, following Javascript Window.open() conventions.url - The URL to open.method - The request method, e.g. GET.pinfo - The URL parameter information.
NavigatorFrame open(java.net.URL url,
java.lang.String method,
ParameterInfo pinfo)
url - The URL to open.method - The request method, e.g. GET.pinfo - The URL parameter information.
void navigate(java.lang.String urlOrPath)
throws java.net.MalformedURLException
urlOrPath - An absolute URL or file path.
java.net.MalformedURLException
void navigate(java.lang.String urlOrPath,
RequestType requestType)
throws java.net.MalformedURLException
urlOrPath - An absolute URL or file path.requestType - The request type.
java.net.MalformedURLExceptionvoid navigate(java.net.URL url)
url - An absolute URL.
void navigate(java.net.URL url,
RequestType requestType)
url - An absolute URL.requestType - The request type.
void navigate(java.net.URL url,
java.lang.String method,
ParameterInfo paramInfo,
TargetType targetType,
RequestType requestType)
url - An absolute or relative URL.method - The request method.paramInfo - The request parameters.targetType - The frame target type.requestType - The request type.
void navigate(java.net.URL url,
java.lang.String method,
ParameterInfo paramInfo,
TargetType targetType,
RequestType requestType,
NavigatorFrame originatingFrame)
url - An absolute or relative URL.method - The request method.paramInfo - The request parameters.targetType - The frame target type.requestType - The request type.originatingFrame - The frame where the request originated.
void linkClicked(java.net.URL url,
TargetType targetType,
java.lang.Object linkObject)
navigate(java.net.URL, String, ParameterInfo, TargetType, RequestType),
except this method should be called when navigation is triggered by a user click.
url - An absolute or relative URL.targetType - The frame target type.linkObject - An implementation-dependent object representing what was clicked.
For example, in HTML documents the linkObject might
be of type org.w3c.dom.html2.HTMLElement.void closeWindow()
java.lang.SecurityException - If closing the window is now allowed in the current context.void invokeLater(java.lang.Runnable runnable)
void windowToBack()
void windowToFront()
boolean confirm(java.lang.String message)
message - The question text.
java.lang.String prompt(java.lang.String message,
java.lang.String inputDefault)
message - The question text.inputDefault - The default prompt value.
java.awt.Component getComponent()
getComponentContent()void alert(java.lang.String message)
message - The message shown in the alert dialog.void setProgressEvent(NavigatorProgressEvent event)
event - The progress event object.getProgressEvent()NavigatorProgressEvent getProgressEvent()
setProgressEvent(NavigatorProgressEvent)tNavigatorFrame getParentFrame()
null for the top frame.
NavigatorFrame getTopFrame()
null.
boolean back()
boolean forward()
boolean canForward()
boolean canBack()
NavigatorFrame createFrame()
java.lang.String getDefaultStatus()
void setDefaultStatus(java.lang.String value)
java.lang.String getWindowId()
NavigatorFrame getOpenerFrame()
java.lang.String getStatus()
boolean isWindowClosed()
void setStatus(java.lang.String status)
void reload()
void replaceContent(ClientletResponse response,
ComponentContent component)
java.security.SecurityException - Thrown when the caller
does not have permission to replace the content of the
frame.ClientletContext.setResultingContent(Component)void replaceContent(java.awt.Component component)
replaceContent(org.lobobrowser.clientlet.ClientletResponse, org.lobobrowser.clientlet.ComponentContent)
provided for convenience.
component - A AWT or Swing component.java.lang.String getSourceCode()
java.security.SecurityException - Thrown when the caller
does not have permission to get the source code.NetworkRequest createNetworkRequest()
NetworkRequest object that can be used
to load data over HTTP and other network protocols.
ComponentContent getComponentContent()
void resizeWindowTo(int width,
int height)
width - The new window width.height - The new window height.
void resizeWindowBy(int byWidth,
int byHeight)
byWidth - The number of pixels to expand the width by.byHeight - The number of pixels to expand the height by.NavigationEntry getCurrentNavigationEntry()
NavigationEntry getPreviousNavigationEntry()
NavigationEntry getNextNavigationEntry()
void moveInHistory(int offset)
offset - A positive or negative number, where -1 is
equivalent to back() and +1 is
equivalent to forward().void navigateInHistory(java.lang.String absoluteURL)
absoluteURL - The target URL.int getHistoryLength()
void setProperty(java.lang.String name,
java.lang.Object value)
defaultMarginInsets
(java.awt.Inset), defaultOverflowX and defaultOverflowY.
name - The name of the property.value - The value of the property. The type of the value depends on the property
and the underlying implementation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||