org.telscenter.pas.ui.browser
Interface IBrowser


public interface IBrowser

Generic interface for any web browser component. Modeled after JDIC's org.jdesktop.jdic.browser.IWebBrowser

Author:
turadg

Field Summary
static java.lang.String IE
           
static java.lang.String MOZILLA
           
static java.lang.String SAFARI
           
 
Method Summary
 void addBrowserListener(IBrowserListener listener)
           
 void back()
          Navigates backward one item in the history list.
 void forward()
          Navigates forward one item in the history list.
 java.lang.String getBrowserType()
           
 java.awt.Component getComponent()
          Returns the Canvas representing the interface of the browser
 java.lang.String getContent()
          Get the current content displayed in the webbrowser.
 java.lang.String getPageTitle()
           
 java.net.URL getUrl()
          Returns the URL of the resource that is currently being displayed.
 void refresh()
          Reloads the URL that is currently displayed in the WebBrowser component.
 void removeBrowserListener(IBrowserListener listener)
           
 void setContent(java.lang.String content)
           
 void setNavigationPolicy(NavigationPolicy policy)
          Policy with whitelist and blacklist of what urls can be navigated to
 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 any page loading and rendering activities.
 

Field Detail

SAFARI

static final java.lang.String SAFARI
See Also:
Constant Field Values

IE

static final java.lang.String IE
See Also:
Constant Field Values

MOZILLA

static final java.lang.String MOZILLA
See Also:
Constant Field Values
Method Detail

getPageTitle

java.lang.String getPageTitle()

getBrowserType

java.lang.String getBrowserType()
Returns:
identifier of browser type (e.g. Safari, IE, Mozilla)

getComponent

java.awt.Component getComponent()
Returns the Canvas representing the interface of the browser

Returns:

back

void back()
Navigates backward one item in the history list.


forward

void forward()
Navigates forward one item in the history list.


getUrl

java.net.URL getUrl()
Returns the URL of the resource that is currently being displayed.

Returns:
the current URL being display, or null if no URL is currently displayed or the WebBrowser is not yet initialized.

setUrl

void setUrl(java.net.URL url)
Navigates to a resource identified by an URL using HTTP GET method.

Parameters:
url - the URL to which to navigate.

setUrl

void setUrl(java.net.URL url,
            java.lang.String postData)
Navigates to a resource identified by an URL using HTTP POST method.

Parameters:
url - the URL to which to navigate.
postData - Data to send to the server during the HTTP POST transaction.

stop

void stop()
Stops any page loading and rendering activities.


refresh

void refresh()
Reloads the URL that is currently displayed in the WebBrowser component.


getContent

java.lang.String getContent()
Get the current content displayed in the webbrowser. The coorsponding setContent is not implemented because jdic does not support a relative url for file locations, but webrenderer does. It is not clear how to deal with this.

Returns:

setContent

void setContent(java.lang.String content)

setNavigationPolicy

void setNavigationPolicy(NavigationPolicy policy)
                         throws java.lang.UnsupportedOperationException
Policy with whitelist and blacklist of what urls can be navigated to

Parameters:
policy -
Throws:
java.lang.UnsupportedOperationException

addBrowserListener

void addBrowserListener(IBrowserListener listener)

removeBrowserListener

void removeBrowserListener(IBrowserListener listener)


Copyright © 2004-2008 TELS Center. All Rights Reserved.