com.objectplanet.gui.tabs
Class TabbedEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjava.awt.AWTEvent
          extended bycom.objectplanet.gui.tabs.TabbedEvent
All Implemented Interfaces:
java.io.Serializable

public class TabbedEvent
extends java.awt.AWTEvent

This is the event generated by a tabbed panel, when a component is either selected, deselected, detached, or retached to the panel.

The event contains the name of the tab that was selected/deselected, the component that the tab contains, and the detach window if it was detached.

Author:
Bjorn J. Kvande.
See Also:
Serialized Form

Field Summary
static int TAB_ADDED
          Event type used when a tab is added to the panel.
static int TAB_DETACHED
          Event type used when a tab component was detached.
static int TAB_HIDDEN
          Event type used when a tab component was hidden.
static int TAB_REMOVED
          Event type used when a tab is removed from the panel.
static int TAB_RETACHED
          Event type used when a tab component was reattached.
static int TAB_SHOWN
          Event type used when a tab component was shown.
 
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
TabbedEvent(int type, java.lang.Object source, java.lang.String tab, java.awt.Component component)
          Creates a new tabbed panel event when detaching a component.
 
Method Summary
 java.awt.Component getComponent()
          Gets the component of the tab.
 java.lang.String getTab()
          Gets the name of the tab that originated the event.
 int getType()
          Gets the type of the event.
 java.lang.String toString()
          Prints the event information
 
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource
 
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

TAB_ADDED

public static final int TAB_ADDED
Event type used when a tab is added to the panel.

See Also:
Constant Field Values

TAB_DETACHED

public static final int TAB_DETACHED
Event type used when a tab component was detached.

See Also:
Constant Field Values

TAB_HIDDEN

public static final int TAB_HIDDEN
Event type used when a tab component was hidden.

See Also:
Constant Field Values

TAB_REMOVED

public static final int TAB_REMOVED
Event type used when a tab is removed from the panel.

See Also:
Constant Field Values

TAB_RETACHED

public static final int TAB_RETACHED
Event type used when a tab component was reattached.

See Also:
Constant Field Values

TAB_SHOWN

public static final int TAB_SHOWN
Event type used when a tab component was shown.

See Also:
Constant Field Values
Constructor Detail

TabbedEvent

public TabbedEvent(int type,
                   java.lang.Object source,
                   java.lang.String tab,
                   java.awt.Component component)
Creates a new tabbed panel event when detaching a component.

Parameters:
type - The event type.
source - The object that generated the event.
tab - The name of the tab.
component - The component in the tab.
Method Detail

getComponent

public java.awt.Component getComponent()
Gets the component of the tab.


getTab

public java.lang.String getTab()
Gets the name of the tab that originated the event.


getType

public int getType()
Gets the type of the event.

Returns:
TAB_SHOWN, TAB_HIDDEN, TAB_DETACHED, or TAB_RETACHED.

toString

public java.lang.String toString()
Prints the event information