de.schlichtherle.swing.event
Class PanelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.awt.AWTEvent
          extended by de.schlichtherle.swing.event.PanelEvent
All Implemented Interfaces:
Serializable

public class PanelEvent
extends AWTEvent

Fired when the ancestor window of an EnhancedPanel is shown or hidden.

Note that since TrueZIP 6.1, this class has been refactored to subclass AWTEvent (which subclasses EventObject) instead of EventObject directly. This has been done in order to allow coalescing multiple events for the same cause by posting them to the AWT's Event Queue, from which the coalesced event would then be dispatched by AWT's Event Dispatching Thread.

However, since TrueZIP 6.4, these events are fired synchronously again, whereby it is ensured that only a single event is fired for each cause. The super class is kept for backwards compatibility only.

Since:
TrueZIP 5.1
Version:
TrueZIP 6.7
Author:
Christian Schlichtherle
See Also:
Serialized Form

Field Summary
static int ANCESTOR_WINDOW_HIDDEN
          The id for Ancestor Window Hidden Event.
static int ANCESTOR_WINDOW_SHOWN
          The id for Ancestor Window Shown Event.
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PanelEvent(EnhancedPanel source, int id)
           
 
Method Summary
 Window getAncestorWindow()
          Returns the ancestor window for this event or null if the source of this event is not an EnhancedPanel.
 EnhancedPanel getSourcePanel()
          Returns the source of this event as an EnhancedPanel or null if it's not an instance of this class.
 String paramString()
           
 
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, setSource, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANCESTOR_WINDOW_SHOWN

public static final int ANCESTOR_WINDOW_SHOWN
The id for Ancestor Window Shown Event.

See Also:
Constant Field Values

ANCESTOR_WINDOW_HIDDEN

public static final int ANCESTOR_WINDOW_HIDDEN
The id for Ancestor Window Hidden Event.

See Also:
Constant Field Values
Constructor Detail

PanelEvent

public PanelEvent(EnhancedPanel source,
                  int id)
Method Detail

getSourcePanel

public EnhancedPanel getSourcePanel()
Returns the source of this event as an EnhancedPanel or null if it's not an instance of this class.


getAncestorWindow

public Window getAncestorWindow()
Returns the ancestor window for this event or null if the source of this event is not an EnhancedPanel.


paramString

public String paramString()
Overrides:
paramString in class AWTEvent