|
JDIC API V2006 Release 0308 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IWebBrowser
A IWebBrowser
component represents a blank rectangular area of
the screen onto which the application can display webpages or from which the
application can trap events from the browser window. In order to show a
Browser component in GUI, user need to add Browser to a top-level container,
such as Frame
.
The class that is interested in processing a Browser event should implement
interface WebBrowserListener
, and the object created with
that class should use Browser's addWebBrowserListener
method
to register as a listener.
IBrowserEngine
,
WebBrowserEvent
,
WebBrowserListener
Method Summary | |
---|---|
void |
addWebBrowserListener(WebBrowserListener listener)
Adds a WebBrowserEvent listener. |
java.awt.Component |
asComponent()
Returns the component to which the Browser paints. |
void |
back()
Navigates to the previous session history item. |
void |
dispatchWebBrowserEvent(WebBrowserEvent event)
|
java.lang.String |
executeScript(java.lang.String javaScript)
Executes specified JavaScript code in a currently opened document. |
void |
forward()
Navigates to the next session history item. |
IBrowserEngine |
getBrowserEngine()
The BrowserEngine that was responsible for creating the browser instance. |
java.lang.String |
getContent()
Returns the HTML content of a document, opened in a browser. |
java.lang.String |
getInitFailureMessage()
|
int |
getInstanceNum()
A IWebBrowser must have a ticket to identify itself, here is the instance num.For a IWebBrowser instance, a native browser instance will be created to deal with its requests, this instance num will be used get according native browser instance. |
int |
getNativeWindow()
Get the windows' handler of native window |
java.net.URL |
getURL()
Retrieves the URL that is currently being displayed. |
boolean |
isBackEnabled()
|
boolean |
isForwardEnabled()
|
boolean |
isInitialized()
|
boolean |
isSynchronize()
If the webbrowser works under synchronize model |
void |
refresh()
Reloads the URL that is currently being displayed in the WebBrowser component. |
void |
removeWebBrowserListener(WebBrowserListener listener)
Removes a WebBrowserEvent listener. |
void |
setContent(java.lang.String htmlContent)
Sets new HTML content. |
void |
setInitFailureMessage(java.lang.String msg)
|
void |
setInitialized(boolean b)
Set if the IWebBrowser has been initialized. |
void |
setURL()
Sets the document to be a blank page. |
void |
setURL(java.net.URL url)
Navigates to a resource identified by an URL using HTTP GET method. |
void |
setURL(java.net.URL url,
java.lang.String postData)
Navigates to a resource identified by an URL using HTTP POST method. |
void |
stop()
Stops loading of the current URL. |
Method Detail |
---|
void addWebBrowserListener(WebBrowserListener listener)
WebBrowserEvent
listener.
listener
- object which implements WebBrowserListener interface.void removeWebBrowserListener(WebBrowserListener listener)
WebBrowserEvent
listener.
listener
- object which implements WebBrowserListener interface. If the
listener was not in the listeners list, then no listener will
be removed.boolean isSynchronize()
java.awt.Component asComponent()
java.net.URL getURL()
null
if the
WebBrowser object is not ready with initialization of itself.void setURL()
void setURL(java.net.URL url)
url
- the URL to navigate.void setURL(java.net.URL url, java.lang.String postData)
url
- the URL to navigate.postData
- Data to send to the server during the HTTP POST transaction.java.lang.String getContent()
void setContent(java.lang.String htmlContent)
htmlContent
- the HTML content to set.java.lang.String executeScript(java.lang.String javaScript)
WebBrowserListener
.
void back()
void forward()
void refresh()
void stop()
IBrowserEngine getBrowserEngine()
BrowserEngine
that was responsible for
creating this browser instance.boolean isBackEnabled()
boolean isForwardEnabled()
boolean isInitialized()
int getInstanceNum()
int getNativeWindow()
void dispatchWebBrowserEvent(WebBrowserEvent event)
event
- void setInitFailureMessage(java.lang.String msg)
java.lang.String getInitFailureMessage()
void setInitialized(boolean b)
b
-
|
JDIC API V2006 Release 0308 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, working code examples, license terms and bug report information.
Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.