com.isti.util.gui
Class IstiDialogPopup.CloseListener

java.lang.Object
  extended by com.isti.util.gui.IstiDialogPopup.CloseListener
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.event.WindowListener, java.util.EventListener
Enclosing class:
IstiDialogPopup

public abstract static class IstiDialogPopup.CloseListener
extends java.lang.Object
implements java.awt.event.WindowListener, java.awt.event.ComponentListener

Class CloseListener defines a call-back method that is to be invoked when a dialog instance is closed, hidden or disposed. This class implements both the 'WindowListener' and 'ComponentListener' interfaces, and as such may be added to a dialog window via both the 'addWindowListener()' and 'addComponentListener()' methods. When the dialog is closed, hidden or disposed, the user-defined 'dialogClosed()' method is invoked. If any of the "window...()" or "component...()" methods of this class are overridden, the original method should still be called. The purpose of this class is to make it easier to attach a dialog listener that is reliably invoked when the dialog is dismissed. Various versions of Java (1.3 vs. 1.4) use 'hide()' and 'dispose()' in different ways in response to how the dialog is dismissed, and the methods call different listeners (and combinations of listeners) depending on which method is invoked. This class allows both types of listeners to be easily monitored.


Field Summary
protected  boolean closeMethodInvokedFlag
          Flag set true after closed and false after opened.
 
Constructor Summary
IstiDialogPopup.CloseListener()
           
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent evtObj)
          Invoked when the component has been made invisible.
 void componentMoved(java.awt.event.ComponentEvent evtObj)
          Invoked when the component's position changes.
 void componentResized(java.awt.event.ComponentEvent evtObj)
          Invoked when the component's size changes.
 void componentShown(java.awt.event.ComponentEvent evtObj)
          Invoked when the component has been made visible.
abstract  void dialogClosed(java.lang.Object evtObj)
          This method is invoked when the dialog is closed, hidden or disposed.
 void windowActivated(java.awt.event.WindowEvent evtObj)
          Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.
 void windowClosed(java.awt.event.WindowEvent evtObj)
          Invoked when a window has been closed as the result of calling dispose on the window.
 void windowClosing(java.awt.event.WindowEvent evtObj)
          Invoked when the user attempts to close the window from the window's system menu.
 void windowDeactivated(java.awt.event.WindowEvent evtObj)
          Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.
 void windowDeiconified(java.awt.event.WindowEvent evtObj)
          Invoked when a window is changed from a minimized to a normal state.
 void windowIconified(java.awt.event.WindowEvent evtObj)
          Invoked when a window is changed from a normal to a minimized state.
 void windowOpened(java.awt.event.WindowEvent evtObj)
          Invoked the first time a window is made visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

closeMethodInvokedFlag

protected boolean closeMethodInvokedFlag
Flag set true after closed and false after opened.

Constructor Detail

IstiDialogPopup.CloseListener

public IstiDialogPopup.CloseListener()
Method Detail

dialogClosed

public abstract void dialogClosed(java.lang.Object evtObj)
This method is invoked when the dialog is closed, hidden or disposed. This method should be overridden by the user.

Parameters:
evtObj - the source event object, either a 'WindowEvent' or a 'ComponentEvent'.

windowOpened

public void windowOpened(java.awt.event.WindowEvent evtObj)
Invoked the first time a window is made visible. This method is part of the 'WindowListener' implementation.

Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

windowClosing

public void windowClosing(java.awt.event.WindowEvent evtObj)
Invoked when the user attempts to close the window from the window's system menu. If the program does not explicitly hide or dispose the window while processing this event, the window close operation will be cancelled. This method is part of the 'WindowListener' implementation.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

windowClosed

public void windowClosed(java.awt.event.WindowEvent evtObj)
Invoked when a window has been closed as the result of calling dispose on the window. This method is part of the 'WindowListener' implementation.

Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

windowIconified

public void windowIconified(java.awt.event.WindowEvent evtObj)
Invoked when a window is changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property. This method is part of the 'WindowListener' implementation.

Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent evtObj)
Invoked when a window is changed from a minimized to a normal state. This method is part of the 'WindowListener' implementation.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

windowActivated

public void windowActivated(java.awt.event.WindowEvent evtObj)
Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events. This method is part of the 'WindowListener' implementation.

Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent evtObj)
Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents. This method is part of the 'WindowListener' implementation.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
evtObj - the window-event object.

componentResized

public void componentResized(java.awt.event.ComponentEvent evtObj)
Invoked when the component's size changes. This method is part of the 'ComponentListener' implementation.

Specified by:
componentResized in interface java.awt.event.ComponentListener
Parameters:
evtObj - the component-event object.

componentMoved

public void componentMoved(java.awt.event.ComponentEvent evtObj)
Invoked when the component's position changes. This method is part of the 'ComponentListener' implementation.

Specified by:
componentMoved in interface java.awt.event.ComponentListener
Parameters:
evtObj - the component-event object.

componentShown

public void componentShown(java.awt.event.ComponentEvent evtObj)
Invoked when the component has been made visible. This method is part of the 'ComponentListener' implementation.

Specified by:
componentShown in interface java.awt.event.ComponentListener
Parameters:
evtObj - the component-event object.

componentHidden

public void componentHidden(java.awt.event.ComponentEvent evtObj)
Invoked when the component has been made invisible. This method is part of the 'ComponentListener' implementation.

Specified by:
componentHidden in interface java.awt.event.ComponentListener
Parameters:
evtObj - the component-event object.