Class WindowAdapter

  extended by
All Implemented Interfaces:
WindowListener, java.util.EventListener

public abstract class WindowAdapter
extends java.lang.Object
implements WindowListener

An abstract adapter class for receiving browser window events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a WindowEvent listener and override the methods for the events of interest. (If you implement the WindowListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a browser using the browser's addWindowListener method. When a browser event occurs, the relevant method in the listener object is invoked and the WindowEvent is passed to it.

JadeLiquid Software

Constructor Summary
Method Summary
 void onNewWindow(WindowEvent e)
          Invoked when a new window is requested.
 void onWindowDestroy(WindowEvent e)
          Invoked when a window destroyed.
 void onWindowResize(WindowEvent e)
          Invoked when a window resized.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public WindowAdapter()
Method Detail


public void onNewWindow(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a new window is requested. e.getPopupBrowser() returns the IBrowserCanvas. e.getWidth() and e.getHeight() return the requested size for the popup, this may change later through a call from onWindowResize(). BrowserFactory.destroyBrowser must be called on the popupBrowser when it is no longer needed.

Specified by:
onNewWindow in interface WindowListener


public void onWindowDestroy(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a window destroyed. The web browser has been destroyed by a window.close(). Normal behaviour on this event is to close the frame (or tab) contianing the IBrowserCanvas.

Specified by:
onWindowDestroy in interface WindowListener


public void onWindowResize(WindowEvent e)
Description copied from interface: WindowListener
Invoked when a window resized. e.getWidth() and e.getHeight() contain the requested size.

Specified by:
onWindowResize in interface WindowListener