javax.swing.event
Class InternalFrameEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent 
          extended by javax.swing.event.InternalFrameEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class InternalFrameEvent
extends AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent

An AWTEvent that adds support for JInternalFrame objects as the event source. This class has the same event types as WindowEvent, although different IDs are used. Help on handling internal frame events is in How to Write an Internal Frame Listener, a section in The Java Tutorial.

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:
WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent , WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener , JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame , InternalFrameListener sample code for javax.swing.event.InternalFrameListener definition code for javax.swing.event.InternalFrameListener , Serialized Form

Field Summary
static int INTERNAL_FRAME_ACTIVATED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_ACTIVATED definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_ACTIVATED
          The "window activated" event type.
static int INTERNAL_FRAME_CLOSED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSED definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSED
          The "window closed" event.
static int INTERNAL_FRAME_CLOSING sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSING definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSING
          The "window is closing" event.
static int INTERNAL_FRAME_DEACTIVATED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED
          The "window deactivated" event type.
static int INTERNAL_FRAME_DEICONIFIED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED
          The "window deiconified" event type.
static int INTERNAL_FRAME_FIRST sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_FIRST definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_FIRST
          The first number in the range of IDs used for internal frame events.
static int INTERNAL_FRAME_ICONIFIED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_ICONIFIED definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_ICONIFIED
          The "window iconified" event.
static int INTERNAL_FRAME_LAST sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_LAST definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_LAST
          The last number in the range of IDs used for internal frame events.
static int INTERNAL_FRAME_OPENED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_OPENED definition code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_OPENED
          The "window opened" event.
 
Fields inherited from class java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
ACTION_EVENT_MASK sample code for java.awt.AWTEvent.ACTION_EVENT_MASK definition code for java.awt.AWTEvent.ACTION_EVENT_MASK , ADJUSTMENT_EVENT_MASK sample code for java.awt.AWTEvent.ADJUSTMENT_EVENT_MASK definition code for java.awt.AWTEvent.ADJUSTMENT_EVENT_MASK , COMPONENT_EVENT_MASK sample code for java.awt.AWTEvent.COMPONENT_EVENT_MASK definition code for java.awt.AWTEvent.COMPONENT_EVENT_MASK , consumed sample code for java.awt.AWTEvent.consumed definition code for java.awt.AWTEvent.consumed , CONTAINER_EVENT_MASK sample code for java.awt.AWTEvent.CONTAINER_EVENT_MASK definition code for java.awt.AWTEvent.CONTAINER_EVENT_MASK , FOCUS_EVENT_MASK sample code for java.awt.AWTEvent.FOCUS_EVENT_MASK definition code for java.awt.AWTEvent.FOCUS_EVENT_MASK , HIERARCHY_BOUNDS_EVENT_MASK sample code for java.awt.AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK definition code for java.awt.AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK , HIERARCHY_EVENT_MASK sample code for java.awt.AWTEvent.HIERARCHY_EVENT_MASK definition code for java.awt.AWTEvent.HIERARCHY_EVENT_MASK , id sample code for java.awt.AWTEvent.id definition code for java.awt.AWTEvent.id , INPUT_METHOD_EVENT_MASK sample code for java.awt.AWTEvent.INPUT_METHOD_EVENT_MASK definition code for java.awt.AWTEvent.INPUT_METHOD_EVENT_MASK , INVOCATION_EVENT_MASK sample code for java.awt.AWTEvent.INVOCATION_EVENT_MASK definition code for java.awt.AWTEvent.INVOCATION_EVENT_MASK , ITEM_EVENT_MASK sample code for java.awt.AWTEvent.ITEM_EVENT_MASK definition code for java.awt.AWTEvent.ITEM_EVENT_MASK , KEY_EVENT_MASK sample code for java.awt.AWTEvent.KEY_EVENT_MASK definition code for java.awt.AWTEvent.KEY_EVENT_MASK , MOUSE_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_EVENT_MASK , MOUSE_MOTION_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_MOTION_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_MOTION_EVENT_MASK , MOUSE_WHEEL_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_WHEEL_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_WHEEL_EVENT_MASK , PAINT_EVENT_MASK sample code for java.awt.AWTEvent.PAINT_EVENT_MASK definition code for java.awt.AWTEvent.PAINT_EVENT_MASK , RESERVED_ID_MAX sample code for java.awt.AWTEvent.RESERVED_ID_MAX definition code for java.awt.AWTEvent.RESERVED_ID_MAX , TEXT_EVENT_MASK sample code for java.awt.AWTEvent.TEXT_EVENT_MASK definition code for java.awt.AWTEvent.TEXT_EVENT_MASK , WINDOW_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_EVENT_MASK , WINDOW_FOCUS_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_FOCUS_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_FOCUS_EVENT_MASK , WINDOW_STATE_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_STATE_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
InternalFrameEvent sample code for javax.swing.event.InternalFrameEvent.InternalFrameEvent(javax.swing.JInternalFrame, int) definition code for javax.swing.event.InternalFrameEvent.InternalFrameEvent(javax.swing.JInternalFrame, int) (JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame  source, int id)
          Constructs an InternalFrameEvent object.
 
Method Summary
 JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame getInternalFrame sample code for javax.swing.event.InternalFrameEvent.getInternalFrame() definition code for javax.swing.event.InternalFrameEvent.getInternalFrame() ()
          Returns the originator of the event.
 String sample code for java.lang.String definition code for java.lang.String paramString sample code for javax.swing.event.InternalFrameEvent.paramString() definition code for javax.swing.event.InternalFrameEvent.paramString() ()
          Returns a parameter string identifying this event.
 
Methods inherited from class java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
consume sample code for java.awt.AWTEvent.consume() definition code for java.awt.AWTEvent.consume() , getID sample code for java.awt.AWTEvent.getID() definition code for java.awt.AWTEvent.getID() , isConsumed sample code for java.awt.AWTEvent.isConsumed() definition code for java.awt.AWTEvent.isConsumed() , setSource sample code for java.awt.AWTEvent.setSource(java.lang.Object) definition code for java.awt.AWTEvent.setSource(java.lang.Object) , toString sample code for java.awt.AWTEvent.toString() definition code for java.awt.AWTEvent.toString()
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource()
 
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() , 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)
 

Field Detail

INTERNAL_FRAME_FIRST sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_FIRST

public static final int INTERNAL_FRAME_FIRST
The first number in the range of IDs used for internal frame events.

See Also:
Constant Field Values

INTERNAL_FRAME_LAST sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_LAST

public static final int INTERNAL_FRAME_LAST
The last number in the range of IDs used for internal frame events.

See Also:
Constant Field Values

INTERNAL_FRAME_OPENED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_OPENED

public static final int INTERNAL_FRAME_OPENED
The "window opened" event. This event is delivered only the first time the internal frame is made visible.

See Also:
JInternalFrame.show() sample code for javax.swing.JInternalFrame.show() definition code for javax.swing.JInternalFrame.show() , Constant Field Values

INTERNAL_FRAME_CLOSING sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSING

public static final int INTERNAL_FRAME_CLOSING
The "window is closing" event. This event is delivered when the user attempts to close the internal frame, such as by clicking the internal frame's close button, or when a program attempts to close the internal frame by invoking the setClosed method.

See Also:
JInternalFrame.setDefaultCloseOperation(int) sample code for javax.swing.JInternalFrame.setDefaultCloseOperation(int) definition code for javax.swing.JInternalFrame.setDefaultCloseOperation(int) , JInternalFrame.doDefaultCloseAction() sample code for javax.swing.JInternalFrame.doDefaultCloseAction() definition code for javax.swing.JInternalFrame.doDefaultCloseAction() , JInternalFrame.setClosed(boolean) sample code for javax.swing.JInternalFrame.setClosed(boolean) definition code for javax.swing.JInternalFrame.setClosed(boolean) , Constant Field Values

INTERNAL_FRAME_CLOSED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSED

public static final int INTERNAL_FRAME_CLOSED
The "window closed" event. This event is delivered after the internal frame has been closed as the result of a call to the setClosed or dispose method.

See Also:
JInternalFrame.setClosed(boolean) sample code for javax.swing.JInternalFrame.setClosed(boolean) definition code for javax.swing.JInternalFrame.setClosed(boolean) , JInternalFrame.dispose() sample code for javax.swing.JInternalFrame.dispose() definition code for javax.swing.JInternalFrame.dispose() , Constant Field Values

INTERNAL_FRAME_ICONIFIED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_ICONIFIED

public static final int INTERNAL_FRAME_ICONIFIED
The "window iconified" event. This event indicates that the internal frame was shrunk down to a small icon.

See Also:
JInternalFrame.setIcon(boolean) sample code for javax.swing.JInternalFrame.setIcon(boolean) definition code for javax.swing.JInternalFrame.setIcon(boolean) , Constant Field Values

INTERNAL_FRAME_DEICONIFIED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED

public static final int INTERNAL_FRAME_DEICONIFIED
The "window deiconified" event type. This event indicates that the internal frame has been restored to its normal size.

See Also:
JInternalFrame.setIcon(boolean) sample code for javax.swing.JInternalFrame.setIcon(boolean) definition code for javax.swing.JInternalFrame.setIcon(boolean) , Constant Field Values

INTERNAL_FRAME_ACTIVATED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_ACTIVATED

public static final int INTERNAL_FRAME_ACTIVATED
The "window activated" event type. This event indicates that keystrokes and mouse clicks are directed towards this internal frame.

See Also:
JInternalFrame.show() sample code for javax.swing.JInternalFrame.show() definition code for javax.swing.JInternalFrame.show() , JInternalFrame.setSelected(boolean) sample code for javax.swing.JInternalFrame.setSelected(boolean) definition code for javax.swing.JInternalFrame.setSelected(boolean) , Constant Field Values

INTERNAL_FRAME_DEACTIVATED sample code for javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED

public static final int INTERNAL_FRAME_DEACTIVATED
The "window deactivated" event type. This event indicates that keystrokes and mouse clicks are no longer directed to the internal frame.

See Also:
JInternalFrame.setSelected(boolean) sample code for javax.swing.JInternalFrame.setSelected(boolean) definition code for javax.swing.JInternalFrame.setSelected(boolean) , Constant Field Values
Constructor Detail

InternalFrameEvent sample code for javax.swing.event.InternalFrameEvent(javax.swing.JInternalFrame, int) definition code for javax.swing.event.InternalFrameEvent(javax.swing.JInternalFrame, int)

public InternalFrameEvent(JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame  source,
                          int id)
Constructs an InternalFrameEvent object.

Parameters:
source - the JInternalFrame object that originated the event
id - an integer indicating the type of event
Method Detail

paramString sample code for javax.swing.event.InternalFrameEvent.paramString() definition code for javax.swing.event.InternalFrameEvent.paramString()

public String sample code for java.lang.String definition code for java.lang.String  paramString()
Returns a parameter string identifying this event. This method is useful for event logging and for debugging.

Overrides:
paramString sample code for java.awt.AWTEvent.paramString() definition code for java.awt.AWTEvent.paramString() in class AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
Returns:
a string identifying the event and its attributes

getInternalFrame sample code for javax.swing.event.InternalFrameEvent.getInternalFrame() definition code for javax.swing.event.InternalFrameEvent.getInternalFrame()

public JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame  getInternalFrame()
Returns the originator of the event.

Returns:
the JInternalFrame object that originated the event
Since:
1.3