chrriis.dj.nativeswing.swtimpl.components
Class WebBrowserAdapter

java.lang.Object
  extended by chrriis.dj.nativeswing.swtimpl.components.WebBrowserAdapter
All Implemented Interfaces:
WebBrowserListener, EventListener

public abstract class WebBrowserAdapter
extends Object
implements WebBrowserListener

An abstract adapter class for receiving web browser events.

Author:
Christopher Deckers

Constructor Summary
WebBrowserAdapter()
           
 
Method Summary
 void commandReceived(WebBrowserCommandEvent e)
          The web browser can invoke special commands to the application simply by calling through Javascript:
window.location = 'command://' + encodeURIComponent('somecommand') + '&' + encodeURIComponent('param1') + '&' + encodeURIComponent('param2') + ...
 void loadingProgressChanged(WebBrowserEvent e)
           
 void locationChangeCanceled(WebBrowserNavigationEvent e)
          Invoked when the location was changing but one of the listener returned false to block the change.
 void locationChanged(WebBrowserNavigationEvent e)
           
 void locationChanging(WebBrowserNavigationEvent e)
          The event can be consumed.
 void statusChanged(WebBrowserEvent e)
           
 void titleChanged(WebBrowserEvent e)
           
 void windowClosing(WebBrowserEvent e)
          The system is closing the browser component, so all ancestors or related components can be closed upon receiving this notification.
 void windowOpening(WebBrowserWindowOpeningEvent e)
          This event is sent to the browser that originated the event.
 void windowWillOpen(WebBrowserWindowWillOpenEvent e)
          This event is sent to the browser that originated the event, and can be consumed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebBrowserAdapter

public WebBrowserAdapter()
Method Detail

windowWillOpen

public void windowWillOpen(WebBrowserWindowWillOpenEvent e)
Description copied from interface: WebBrowserListener
This event is sent to the browser that originated the event, and can be consumed.

Specified by:
windowWillOpen in interface WebBrowserListener

windowOpening

public void windowOpening(WebBrowserWindowOpeningEvent e)
Description copied from interface: WebBrowserListener
This event is sent to the browser that originated the event.

Specified by:
windowOpening in interface WebBrowserListener

windowClosing

public void windowClosing(WebBrowserEvent e)
Description copied from interface: WebBrowserListener
The system is closing the browser component, so all ancestors or related components can be closed upon receiving this notification. If the window ancestor is a JWebBrowserWindow, the system will close it automatically.

Specified by:
windowClosing in interface WebBrowserListener

locationChanging

public void locationChanging(WebBrowserNavigationEvent e)
Description copied from interface: WebBrowserListener
The event can be consumed.

Specified by:
locationChanging in interface WebBrowserListener

locationChanged

public void locationChanged(WebBrowserNavigationEvent e)
Specified by:
locationChanged in interface WebBrowserListener

locationChangeCanceled

public void locationChangeCanceled(WebBrowserNavigationEvent e)
Description copied from interface: WebBrowserListener
Invoked when the location was changing but one of the listener returned false to block the change.

Specified by:
locationChangeCanceled in interface WebBrowserListener

loadingProgressChanged

public void loadingProgressChanged(WebBrowserEvent e)
Specified by:
loadingProgressChanged in interface WebBrowserListener

titleChanged

public void titleChanged(WebBrowserEvent e)
Specified by:
titleChanged in interface WebBrowserListener

statusChanged

public void statusChanged(WebBrowserEvent e)
Specified by:
statusChanged in interface WebBrowserListener

commandReceived

public void commandReceived(WebBrowserCommandEvent e)
Description copied from interface: WebBrowserListener
The web browser can invoke special commands to the application simply by calling through Javascript:
window.location = 'command://' + encodeURIComponent('somecommand') + '&' + encodeURIComponent('param1') + '&' + encodeURIComponent('param2') + ...
or as a static HREF link.

Specified by:
commandReceived in interface WebBrowserListener