com.teamdev.jxbrowser
Interface PageHost

All Known Subinterfaces:
Browser
All Known Implementing Classes:
AbstractBrowser

public interface PageHost

Allows working with the web page loaded into the browser component.


Method Summary
 void addStatusListener(StatusListener listener)
          Adds the specified status listener to receive status events as StatusChangedEvent instance from the current browser instance.
 void addTitleListener(TitleListener listener)
          Adds the specified title listener to receive browser title events as TitleChangedEvent instance from this browser instance.
 ContextMenuHandler getContextMenuHandler()
          Returns the registered context menu handler or null if no context menu handler is currently registered.
 java.util.List<StatusListener> getStatusListeners()
          Returns a list of all the browser status listeners registered on this browser.
 java.lang.String getStatusMessage()
          Convenience method for getting the current page status message.
 java.lang.String getTitle()
          Returns the current page title.
 java.util.List<TitleListener> getTitleListeners()
          Returns a list of all the browser title listeners registered on this browser.
 void removeStatusListener(StatusListener listener)
          Removes the specified status listener so that it no longer receives browser status events from this browser instance.
 void removeTitleListener(TitleListener listener)
          Removes the specified title listener so that it no longer receives browser title events from this browser instance.
 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.
 

Method Detail

getTitle

java.lang.String getTitle()
Returns the current page title. Use TitleListener to track all title changes.

Returns:
the most recent page title set in the current browser.

getStatusMessage

java.lang.String getStatusMessage()
Convenience method for getting the current page status message. Use StatusListener to track all status message changes.

Returns:
the most recent status message set in the current browser.

addStatusListener

void addStatusListener(StatusListener listener)
Adds the specified status listener to receive status events as StatusChangedEvent instance from the current browser instance.

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

Parameters:
listener - the browser status listener. Can be null.

removeStatusListener

void removeStatusListener(StatusListener listener)
Removes the specified status listener so that it no longer receives browser status events from this browser instance.

Parameters:
listener - the browser status listener.

getStatusListeners

java.util.List<StatusListener> getStatusListeners()
Returns a list of all the browser status listeners registered on this browser.

Returns:
all of this browser's StatusListeners or an empty list if no browser status listeners are currently registered

addTitleListener

void addTitleListener(TitleListener listener)
Adds the specified title listener to receive browser title events as TitleChangedEvent instance from this browser instance.

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

Parameters:
listener - the browser title listener. Can be null.
See Also:
getTitle()

removeTitleListener

void removeTitleListener(TitleListener listener)
Removes the specified title listener so that it no longer receives browser title events from this browser instance.

Parameters:
listener - the browser title listener. Can be null.

getTitleListeners

java.util.List<TitleListener> getTitleListeners()
Returns a list of all the browser title listeners registered on this browser.

Returns:
all of this browser's TitleListeners or an empty list if no browser title listeners are currently registered

setContextMenuHandler

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.

Parameters:
handler - the new context menu handler instance.

getContextMenuHandler

ContextMenuHandler getContextMenuHandler()
Returns the registered context menu handler or null if no context menu handler is currently registered.

Returns:
the registered context menu handler or null if no context menu handler is currently registered.