|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teamdev.jxbrowser.AbstractBrowser<Browser>
com.teamdev.jxbrowser.ie.IEBrowser
public class IEBrowser
The browser component based on MS Internet Explorer Engine.
| Method Summary | |
|---|---|
boolean |
canGoBack()
Returns true if the backward operation can be invoked. |
boolean |
canGoForward()
Returns true if the forward operation can be invoked. |
void |
dispose()
Closes and disposes the current Browser instance. |
java.lang.String |
executeScript(java.lang.String javaScript)
Executes specified JavaScript code in a currently opened document. |
java.util.List<java.lang.String> |
getAllHistory()
Throws UnsupportedOperationException error, because
this method is not implemented for this browser type. |
java.awt.Component |
getComponent()
Returns a Swing component with embedded web browser control that allows displaying web pages. |
Configurable |
getConfigurable()
Returns API enabling or disabling some browser features such as javascript, plug-ins or images etc. |
java.lang.String |
getContent()
Returns the string that represents HTML content of a currently loaded document in WebBrowser. |
ContextMenuHandler |
getContextMenuHandler()
Returns the registered context menu handler or null if
no context menu handler is currently registered. |
int |
getCurrentIndex()
Throws UnsupportedOperationException error, because
this method is not implemented for this browser type. |
java.lang.String |
getCurrentLocation()
Returns the location of a currently loaded web page in Browser component. |
org.w3c.dom.Document |
getDocument()
Returns accessor for the document in the currently loaded page. |
HttpSecurityHandler |
getHttpSecurityHandler()
Returns http security handler that allows processing any security problems or null if it's not present. |
Browser |
getPeer()
Returns JExplorer com.jniwrapper.win32.ie.Browser instance. |
java.lang.String |
getStatusMessage()
Convenience method for getting the current page status message. |
java.lang.String |
getTitle()
Returns the current page title. |
BrowserType |
getType()
Returns the BrowserType.IE type. |
void |
goBack()
Navigates browser back. |
void |
goForward()
Navigates browser forward. |
boolean |
isDisposed()
Returns true if the Browser instance is closed and disposed. |
boolean |
isNavigationFinished()
Returns true if there's no navigation activity in this browser. |
boolean |
isReady()
|
void |
navigate(java.lang.String location)
Navigates to a resource identified by a URL or to a file identified by a full path. |
void |
navigate(java.lang.String location,
java.lang.String postData)
Navigates to a web resource specified by a HTTP URL with HTTP post data. |
void |
refresh()
Reloads the web page currently loaded in the Browser component. |
void |
registerFunction(java.lang.String functionName,
BrowserFunction function)
Registers (maps) an instance of BrowserFunction to the corresponding JavaScript
functionName for the currently loaded document. |
void |
setContent(java.lang.String htmlContent)
Sets the specified HTML content to the current Browser document. |
void |
setContent(java.lang.String htmlContent,
java.lang.String baseURL)
Sets the specified HTML content with the baseURI to the current Browser document. |
void |
setContextMenuHandler(ContextMenuHandler handler)
Sets the handler for the context menu requests that will be nvoked every time the user clicks the right mouse button, or control-clicks, on an element to reveal a contextual menu. |
void |
setHttpSecurityHandler(HttpSecurityHandler h)
Sets the specified HTTP security handler that allows processing any security problems such as Invalid Certificate error, Invalid Certificate Name, Invalid Certificate Date, Moving from a non-SSL to an SSL connection because of a redirect or The redirection requires user confirmation problems. |
void |
setUserAgent(java.lang.String userAgent)
Sets the user-agent string. |
void |
stop()
Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations. |
java.awt.Image |
toImage(boolean wholePage)
Returns an image in which the currently loaded web page is rendered. |
java.awt.Image |
toImage(java.awt.Dimension dimension)
Returns an image in which the currently loaded web page is rendered. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setContent(java.lang.String htmlContent)
BrowserNavigationListener.navigationFinished(NavigationFinishedEvent)
event.
It may be necessary when the document contains some resources
(such as images or JavaScript files) that require some time to
download.
htmlContent - a string that represents HTML content
to set to the current document.Browser.setContent(String, String),
Browser.getContent(),
NavigationListener.navigationFinished(NavigationFinishedEvent)
public void setContent(java.lang.String htmlContent,
java.lang.String baseURL)
BrowserbaseURI to the current Browser document.
This method is executing asynchronously. To make sure that the new
HTML content was applied to the document completely, use the
NavigationListener.navigationFinished(NavigationFinishedEvent)
event.
It may be necessary when the document contains some resources
(such as images or JavaScript files) that require some time to
download.
Note: This method will not set BaseURL if html string contains some HTML errors.
htmlContent - a string that represents HTML content to be set to the current document.baseURL - a string that represents a default address or a default target for all links on a page.Browser.setContent(String),
Browser.getContent(),
NavigationListener.navigationFinished(NavigationFinishedEvent)public java.lang.String getContent()
BrowserNavigationListener.navigationFinished(NavigationFinishedEvent)
event.
Browser.setContent(String),
Browser.setContent(String, String),
NavigationListener.navigationFinished(NavigationFinishedEvent)public BrowserType getType()
BrowserType.IE type.
BrowserType.IE type.BrowserTypepublic java.awt.Component getComponent()
BrowserBrowser
instance and embed it into JFrame:
Browser browser = BrowserFactory.createBrowser();
JFrame frame = new JFrame();
frame.add(browser.getComponent(), BorderLayout.CENTER);
frame.setVisible(true);
public org.w3c.dom.Document getDocument()
BrowserNavigationListener.navigationFinished(NavigationFinishedEvent)
event.
null if it's not presentNavigationListener.navigationFinished(NavigationFinishedEvent)public java.awt.Image toImage(boolean wholePage)
Browser
wholePage - if true returns the whole page, not just what is visible
public java.awt.Image toImage(java.awt.Dimension dimension)
Browser
dimension - - dimension of area to render, in CSS pixels
public void navigate(java.lang.String location)
Navigation
location - the URL of the resource to display or the full path to the file location.
The parameter cannot be null.Navigation.navigate(String, String),
Navigation.stop()
public void navigate(java.lang.String location,
java.lang.String postData)
Navigation
location - the URL of the resource to display or the full path to the file location.
The parameter cannot be null.postData - the string that represents a HTTP post data (for example,
"name=Alex&product=Pizza"), can be null.Navigation.navigate(String),
Navigation.stop()public void refresh()
Navigation
Navigation.navigate(String),
Navigation.navigate(String, String),
Navigation.stop()public void stop()
Navigation
Navigation.navigate(String),
Navigation.navigate(String, String)public void goBack()
Navigation
public void goForward()
Navigation
public boolean isNavigationFinished()
Navigationtrue if there's no navigation activity in this browser.
true if there's no navigation activity in this browser.public java.util.List<java.lang.String> getAllHistory()
UnsupportedOperationException error, because
this method is not implemented for this browser type.
public java.lang.String getCurrentLocation()
NavigationHistory
NavigationHistory.getAllHistory(),
NavigationHistory.getCurrentIndex()public int getCurrentIndex()
UnsupportedOperationException error, because
this method is not implemented for this browser type.
NavigationHistory.getAllHistory()public boolean isDisposed()
Disposabletrue if the Browser instance is closed and disposed. Use this method
when you need to make sure that the Browser native side instance is alive and you can
invoke its methods.
true if the Browser native instance is closed and disposed.Disposable.dispose(),
Disposable.addDisposeListener(com.teamdev.jxbrowser.events.DisposeListener)public boolean canGoBack()
NavigationHistorytrue if the backward operation can be invoked.
true if the backward operation can be invoked.NavigationHistory.canGoForward()public boolean canGoForward()
NavigationHistorytrue if the forward operation can be invoked.
true if the forward operation can be invoked.NavigationHistory.canGoBack()public Configurable getConfigurable()
Browser
public void setUserAgent(java.lang.String userAgent)
Browser
userAgent - the user-agent string.public void setHttpSecurityHandler(HttpSecurityHandler h)
Security
h - the specified HTTP security handler.Security.getHttpSecurityHandler()public HttpSecurityHandler getHttpSecurityHandler()
Securitynull if it's not present.
null if it's not presentSecurity.setHttpSecurityHandler(HttpSecurityHandler)public java.lang.String executeScript(java.lang.String javaScript)
ScriptRunnerScriptErrorWatcher.
javaScript - the string that specifies the code to be executed.
null when no return value.
public void registerFunction(java.lang.String functionName,
BrowserFunction function)
ScriptRunnerBrowserFunction to the corresponding JavaScript
functionName for the currently loaded document. On JavaScript side the
functionName can be used to invoke an appropriate BrowserFunction
on Java side.
functionName - JavaScript function name.function - handler that will be invoked when functionName is invoked on
JavaScript side.public java.lang.String getTitle()
PageHostTitleListener to track all title changes.
public java.lang.String getStatusMessage()
PageHostStatusListener to track all status message changes.
public void setContextMenuHandler(ContextMenuHandler handler)
PageHost
handler - the new context menu handler instance.public ContextMenuHandler getContextMenuHandler()
PageHostnull if
no context menu handler is currently registered.
null if
no context menu handler is currently registered.public void dispose()
Disposable
dispose in interface Disposabledispose in class AbstractBrowser<Browser>Disposable.isDisposed(),
Disposable.addDisposeListener(com.teamdev.jxbrowser.events.DisposeListener)public Browser getPeer()
com.jniwrapper.win32.ie.Browser instance.
This instance is based on the JExplorer com.jniwrapper.win32.ie.Browser
instance which this method returns. You can use this method to get
access to the standard JExplorer Browser component.
getPeer in class AbstractBrowser<Browser>com.jniwrapper.win32.ie.Browser instance.public boolean isReady()
isReady in class AbstractBrowser<Browser>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||