javax.swing
Class JMenu.WinListener

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.event.WindowAdapter sample code for java.awt.event.WindowAdapter definition code for java.awt.event.WindowAdapter 
      extended by javax.swing.JMenu.WinListener
All Implemented Interfaces:
WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener , WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener , WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , EventListener sample code for java.util.EventListener definition code for java.util.EventListener
Enclosing class:
JMenu sample code for javax.swing.JMenu definition code for javax.swing.JMenu

protected class JMenu.WinListener
extends WindowAdapter sample code for java.awt.event.WindowAdapter definition code for java.awt.event.WindowAdapter
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

A listener class that watches for a popup window closing. When the popup is closing, the listener deselects the menu.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Constructor Summary
JMenu.WinListener sample code for javax.swing.JMenu.WinListener.JMenu.WinListener(javax.swing.JPopupMenu) definition code for javax.swing.JMenu.WinListener.JMenu.WinListener(javax.swing.JPopupMenu) (JPopupMenu sample code for javax.swing.JPopupMenu definition code for javax.swing.JPopupMenu  p)
          Create the window listener for the specified popup.
 
Method Summary
 void windowClosing sample code for javax.swing.JMenu.WinListener.windowClosing(java.awt.event.WindowEvent) definition code for javax.swing.JMenu.WinListener.windowClosing(java.awt.event.WindowEvent) (WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
          Deselect the menu when the popup is closed from outside.
 
Methods inherited from class java.awt.event.WindowAdapter sample code for java.awt.event.WindowAdapter definition code for java.awt.event.WindowAdapter
windowActivated sample code for java.awt.event.WindowAdapter.windowActivated(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowActivated(java.awt.event.WindowEvent) , windowClosed sample code for java.awt.event.WindowAdapter.windowClosed(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowClosed(java.awt.event.WindowEvent) , windowDeactivated sample code for java.awt.event.WindowAdapter.windowDeactivated(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowDeactivated(java.awt.event.WindowEvent) , windowDeiconified sample code for java.awt.event.WindowAdapter.windowDeiconified(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowDeiconified(java.awt.event.WindowEvent) , windowGainedFocus sample code for java.awt.event.WindowAdapter.windowGainedFocus(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowGainedFocus(java.awt.event.WindowEvent) , windowIconified sample code for java.awt.event.WindowAdapter.windowIconified(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowIconified(java.awt.event.WindowEvent) , windowLostFocus sample code for java.awt.event.WindowAdapter.windowLostFocus(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowLostFocus(java.awt.event.WindowEvent) , windowOpened sample code for java.awt.event.WindowAdapter.windowOpened(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowOpened(java.awt.event.WindowEvent) , windowStateChanged sample code for java.awt.event.WindowAdapter.windowStateChanged(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowStateChanged(java.awt.event.WindowEvent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

JMenu.WinListener sample code for javax.swing.JMenu.WinListener(javax.swing.JPopupMenu) definition code for javax.swing.JMenu.WinListener(javax.swing.JPopupMenu)

public JMenu.WinListener(JPopupMenu sample code for javax.swing.JPopupMenu definition code for javax.swing.JPopupMenu  p)
Create the window listener for the specified popup.

Method Detail

windowClosing sample code for javax.swing.JMenu.WinListener.windowClosing(java.awt.event.WindowEvent) definition code for javax.swing.JMenu.WinListener.windowClosing(java.awt.event.WindowEvent)

public void windowClosing(WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
Deselect the menu when the popup is closed from outside.

Specified by:
windowClosing sample code for java.awt.event.WindowListener.windowClosing(java.awt.event.WindowEvent) definition code for java.awt.event.WindowListener.windowClosing(java.awt.event.WindowEvent) in interface WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener
Overrides:
windowClosing sample code for java.awt.event.WindowAdapter.windowClosing(java.awt.event.WindowEvent) definition code for java.awt.event.WindowAdapter.windowClosing(java.awt.event.WindowEvent) in class WindowAdapter sample code for java.awt.event.WindowAdapter definition code for java.awt.event.WindowAdapter