Class WindowAdapter

  extended bycom.webrenderer.event.WindowAdapter
All Implemented Interfaces:
java.util.EventListener, WindowListener

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.

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
equals, 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.

Specified by:
onNewWindow in interface WindowListener
e - Event.
e.getPopupBrowser() returns the IBrowserCanvas to add to the UI.
e.getWidth() and e.getHeight() return the requested size for the popup, this may change later through a call from onWindowResize(WindowEvent).
When added to an IIEBrowserCanvas you must then add a listener for onWindowResize to size the frame.


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