com.teamdev.jxbrowser
Interface Navigation

All Known Subinterfaces:
Browser
All Known Implementing Classes:
AbstractBrowser, IEBrowser, MozillaBrowser, SafariBrowser

public interface Navigation

Provides basic navigation functionality for the browser component.


Method Summary
 void addNavigationListener(NavigationListener listener)
          Adds the specified navigation listener to receive browser navigation events from this browser instance.
 java.util.List<NavigationListener> getNavigationListeners()
          Returns a list of all the browser navigation listeners registered on this browser.
 void goBack()
          Navigates browser back.
 void goForward()
          Navigates browser forward.
 boolean isNavigationFinished()
          Returns true if there's no navigation activity in this browser.
 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 removeNavigationListener(NavigationListener listener)
          Removes the specified navigation listener so that it no longer receives browser navigation events from this browser instance.
 void stop()
          Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations.
 void waitReady()
          Blocks current thread execution on 45 seconds until the document is loaded completely.
 

Method Detail

navigate

void navigate(java.lang.String location)
Navigates to a resource identified by a URL or to a file identified by a full path. The WebBrowser can browse to any location in the local file system, on the network, or on the World Wide Web.

This method is invoked asynchronously.

Parameters:
location - the URL of the resource to display or the full path to the file location. The parameter cannot be null.
Throws:
java.lang.NullPointerException - when location is null.
See Also:
navigate(String, String), stop()

navigate

void navigate(java.lang.String location,
              java.lang.String postData)
Navigates to a web resource specified by a HTTP URL with HTTP post data. The WebBrowser can browse to any location in the local file system, on the network, or on the World Wide Web.

This method is invoked asynchronously.

Parameters:
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.
Throws:
java.lang.NullPointerException - when location is null.
See Also:
navigate(String), stop()

refresh

void refresh()
Reloads the web page currently loaded in the Browser component.

This method is invoked asynchronously.

See Also:
navigate(String), navigate(String, String), stop()

stop

void stop()
Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations.

See Also:
navigate(String), navigate(String, String)

goBack

void goBack()
Navigates browser back.


goForward

void goForward()
Navigates browser forward.


waitReady

void waitReady()
Blocks current thread execution on 45 seconds until the document is loaded completely.

See Also:
NavigationListener.navigationFinished(com.teamdev.jxbrowser.events.NavigationFinishedEvent)

isNavigationFinished

boolean isNavigationFinished()
Returns true if there's no navigation activity in this browser.

Returns:
true if there's no navigation activity in this browser.

addNavigationListener

void addNavigationListener(NavigationListener listener)
Adds the specified navigation listener to receive browser navigation events from this browser instance.

If listener listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the browser navigation listener.

removeNavigationListener

void removeNavigationListener(NavigationListener listener)
Removes the specified navigation listener so that it no longer receives browser navigation events from this browser instance.

Parameters:
listener - the browser navigation listener.

getNavigationListeners

java.util.List<NavigationListener> getNavigationListeners()
Returns a list of all the browser navigation listeners registered on this browser.

Returns:
all of this browser's NavigationListeners or an empty list if no browser navigation listeners are currently registered.