Class OptionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--OptionEvent
All Implemented Interfaces:
java.io.Serializable

public class OptionEvent
extends java.awt.AWTEvent

A semantic event which indicates that a Option-defined action occured. This high-level event is generated by an Option component when an action occurs (such as a key insertion). The event is passed to every OptionListener object that registered to receive such events using the Option's addOptionListener method.

The object that implements the OptionListener interface gets this OptionEvent when the event occurs. The listener is therefore spared the details of processing individual selection, and can instead process a "meaningful" (semantic) event like "key inserted".

See Also:
OptionJPanel, Serialized Form

Field Summary
static java.lang.String ANIMATION
          Definition for Animation command, must begin with this String.
static java.lang.String ANIMATION_OFF
          Animation command passed for animation toggle off.
static java.lang.String ANIMATION_ON
          Animation command passed for animation toggle on.
static java.lang.String ANIMATION_PAUSE
          Animation command passed for pause.
static java.lang.String ANIMATION_PLAY
          Animation command passed for play.
static java.lang.String ANIMATION_QUALITY
          Animation command passed for quality change.
static java.lang.String ANIMATION_REWIND
          Animation command passed for rewind.
static java.lang.String ANIMATION_SPEED
          Animation command passed for speed change.
static java.lang.String ANIMATION_STEP_BACK
          Animation command passed for step back.
static java.lang.String ANIMATION_STEP_FORWARD
          Animation command passed for step forward.
static java.lang.String ANIMATION_STEP_OFF
          Animation command passed for step toggle off.
static java.lang.String ANIMATION_STEP_ON
          Animation command passed for step toggle on.
static java.lang.String ANIMATION_STOP
          Animation command passed for stop.
static int ANIMATION_TOOLS_OPTION_PANEL
          ID for an animation tools option panel.
static java.lang.String BALANCE
          actionCommand passed for balancing the tree.
static java.lang.String BALANCE_ALL
          actionCommand passed for balancing the tree.
static java.lang.String BALANCE_CLICK
          actionCommand passed for balancing the tree.
static java.lang.String CLEAR
          actionCommand passed for Clearing.
static java.lang.String CLEAR_ALL
          actionCommand passed for Clearing.
static java.lang.String COLOR_SCHEME_CHANGE
          Animation command passed for a color scheme change.
static java.lang.String COLOR_SETTINGS
          Animation command passed for color settings request.
static java.lang.String COLOR_SETTINGS_ALL
          Animation command passed for color settings all request.
static java.lang.String COLOR_SETTINGS_CHANGE
          Animation command passed for a color settings change.
static int COLOR_TOOLS_OPTION_PANEL
          ID for an color tools option panel.
static int CONTROL_OPTION_PANEL
          ID for an control option panel.
static java.lang.String DELETE
          actionCommand passed for Deletion.
static java.lang.String DELETE_CLICK
          actionCommand passed for Deletion Click.
static int DESKTOP_PANEL
          ID for an desktop panel.
static java.lang.String FUNCTION_CHANGE
          Animation command passed for a function color change.
static java.lang.String GET_INPUT_OPTIONS
          Animation command passed for a input options request.
static java.lang.String GET_STATUS
          actionCommand passed for get status.
static java.lang.String GET_STATUS_ALL
          actionCommand passed for get status.
static java.lang.String INORDER_TRAVERSAL
          Animation command passed for an inorder traversal.
static java.lang.String INPUT_CHANGE_ALL
          actionCommand passed for Change of input (Integer or Character and so forth).
static java.lang.String INSERT
          actionCommand passed for Insertion.
static java.lang.String LEVELORDER_TRAVERSAL
          Animation command passed for a levelorder traversal.
static int MAIN_OPTION_PANEL
          ID for an main option panel.
static java.lang.String MESSAGE_ALL
          Animation command passed for all message to pass.
static java.lang.String MESSAGE_FINAL_ONLY
          Animation command passed for only final messages to pass.
static java.lang.String MESSAGE_OFF
          Animation command passed for no messages to pass.
static int OPTION_PANEL
          ID for an option panel.
static java.lang.String PARTITION_CLICK
          actionCommand passed for Partition.
static java.lang.String POSTORDER_TRAVERSAL
          Animation command passed for a postorder traversal.
static java.lang.String PREORDER_TRAVERSAL
          Animation command passed for a preorder traversal.
static java.lang.String PROGRAM_INFORMATION
          Animation command passed for program information.
static java.lang.String RANDOM_TREE
          Animation command passed to make a random tree.
static java.lang.String RESET
          Animation command passed for the reseting of colors.
static java.lang.String ROTATE_CLICK
          actionCommand passed for Rotate.
static java.lang.String ROTATE_DOUBLE_CLICK
          actionCommand passed for Double Rotate.
static java.lang.String ROTATE_TOP_CLICK
          actionCommand passed for Rotate to top.
static java.lang.String SAVE_ALL
          Animation command passed for a saving of the colors for all trees.
static java.lang.String SAVE_TREE
          Animation command passed for a saving of the colors.
static java.lang.String SEARCH
          actionCommand passed for search the tree.
static java.lang.String SELECT
          actionCommand passed for select the tree.
static java.lang.String SELECT_CLICK
          actionCommand passed for select the tree.
static java.lang.String SPLAY_CLICK
          actionCommand passed for Splay.
static java.lang.String TABBED_PANE
          actionCommand passed for a tabbed pane.
static java.lang.String TREE_INFORMATION
          Animation command passed for tree information.
static int TREE_TOOLS_ALL_OPTION_PANEL
          ID for an tree tools all option panel.
static int TREE_TOOLS_OPTION_PANEL
          ID for an tree tools option panel.
static java.lang.String WINDOWS
          actionCommand passed for a tabbed pane.
static java.lang.String ZOOM_IN
          actionCommand passed for zoom in.
static java.lang.String ZOOM_OUT
          actionCommand passed for zoom out.
 
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, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
OptionEvent(java.lang.Object source, int id, java.lang.String command)
          Constructs an OptionEvent object.
OptionEvent(java.lang.Object source, int id, java.lang.String command, java.lang.Object value)
          Constructs an OptionEvent object with the Object value.
 
Method Summary
 java.lang.String getActionCommand()
          Returns the command string associated with this action.
 java.lang.Object getObjectValue()
          Returns the Object associated with the OptionEvent.
 
Methods inherited from class java.awt.AWTEvent
consume, finalize, getID, isConsumed, paramString, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSERT

public static final java.lang.String INSERT
actionCommand passed for Insertion.

ROTATE_CLICK

public static final java.lang.String ROTATE_CLICK
actionCommand passed for Rotate.

ROTATE_TOP_CLICK

public static final java.lang.String ROTATE_TOP_CLICK
actionCommand passed for Rotate to top.

ROTATE_DOUBLE_CLICK

public static final java.lang.String ROTATE_DOUBLE_CLICK
actionCommand passed for Double Rotate.

SPLAY_CLICK

public static final java.lang.String SPLAY_CLICK
actionCommand passed for Splay.

PARTITION_CLICK

public static final java.lang.String PARTITION_CLICK
actionCommand passed for Partition.

CLEAR

public static final java.lang.String CLEAR
actionCommand passed for Clearing.

CLEAR_ALL

public static final java.lang.String CLEAR_ALL
actionCommand passed for Clearing.

DELETE

public static final java.lang.String DELETE
actionCommand passed for Deletion.

DELETE_CLICK

public static final java.lang.String DELETE_CLICK
actionCommand passed for Deletion Click.

INPUT_CHANGE_ALL

public static final java.lang.String INPUT_CHANGE_ALL
actionCommand passed for Change of input (Integer or Character and so forth).

ZOOM_IN

public static final java.lang.String ZOOM_IN
actionCommand passed for zoom in.

ZOOM_OUT

public static final java.lang.String ZOOM_OUT
actionCommand passed for zoom out.

GET_STATUS

public static final java.lang.String GET_STATUS
actionCommand passed for get status.

GET_STATUS_ALL

public static final java.lang.String GET_STATUS_ALL
actionCommand passed for get status.

BALANCE

public static final java.lang.String BALANCE
actionCommand passed for balancing the tree.

BALANCE_ALL

public static final java.lang.String BALANCE_ALL
actionCommand passed for balancing the tree.

TABBED_PANE

public static final java.lang.String TABBED_PANE
actionCommand passed for a tabbed pane.

WINDOWS

public static final java.lang.String WINDOWS
actionCommand passed for a tabbed pane.

BALANCE_CLICK

public static final java.lang.String BALANCE_CLICK
actionCommand passed for balancing the tree.

SEARCH

public static final java.lang.String SEARCH
actionCommand passed for search the tree.

SELECT

public static final java.lang.String SELECT
actionCommand passed for select the tree.

SELECT_CLICK

public static final java.lang.String SELECT_CLICK
actionCommand passed for select the tree.

ANIMATION_PLAY

public static final java.lang.String ANIMATION_PLAY
Animation command passed for play.

ANIMATION_STOP

public static final java.lang.String ANIMATION_STOP
Animation command passed for stop.

ANIMATION_PAUSE

public static final java.lang.String ANIMATION_PAUSE
Animation command passed for pause.

ANIMATION_REWIND

public static final java.lang.String ANIMATION_REWIND
Animation command passed for rewind.

ANIMATION_STEP_BACK

public static final java.lang.String ANIMATION_STEP_BACK
Animation command passed for step back.

ANIMATION_STEP_FORWARD

public static final java.lang.String ANIMATION_STEP_FORWARD
Animation command passed for step forward.

ANIMATION_SPEED

public static final java.lang.String ANIMATION_SPEED
Animation command passed for speed change.

ANIMATION_ON

public static final java.lang.String ANIMATION_ON
Animation command passed for animation toggle on.

ANIMATION_OFF

public static final java.lang.String ANIMATION_OFF
Animation command passed for animation toggle off.

ANIMATION_STEP_ON

public static final java.lang.String ANIMATION_STEP_ON
Animation command passed for step toggle on.

ANIMATION_STEP_OFF

public static final java.lang.String ANIMATION_STEP_OFF
Animation command passed for step toggle off.

ANIMATION_QUALITY

public static final java.lang.String ANIMATION_QUALITY
Animation command passed for quality change.

ANIMATION

public static final java.lang.String ANIMATION
Definition for Animation command, must begin with this String.

Can use startsWith to determine if the command is an animating command.


TREE_INFORMATION

public static final java.lang.String TREE_INFORMATION
Animation command passed for tree information.

PROGRAM_INFORMATION

public static final java.lang.String PROGRAM_INFORMATION
Animation command passed for program information.

MESSAGE_ALL

public static final java.lang.String MESSAGE_ALL
Animation command passed for all message to pass.

MESSAGE_FINAL_ONLY

public static final java.lang.String MESSAGE_FINAL_ONLY
Animation command passed for only final messages to pass.

MESSAGE_OFF

public static final java.lang.String MESSAGE_OFF
Animation command passed for no messages to pass.

RANDOM_TREE

public static final java.lang.String RANDOM_TREE
Animation command passed to make a random tree.

PREORDER_TRAVERSAL

public static final java.lang.String PREORDER_TRAVERSAL
Animation command passed for a preorder traversal.

POSTORDER_TRAVERSAL

public static final java.lang.String POSTORDER_TRAVERSAL
Animation command passed for a postorder traversal.

INORDER_TRAVERSAL

public static final java.lang.String INORDER_TRAVERSAL
Animation command passed for an inorder traversal.

LEVELORDER_TRAVERSAL

public static final java.lang.String LEVELORDER_TRAVERSAL
Animation command passed for a levelorder traversal.

GET_INPUT_OPTIONS

public static final java.lang.String GET_INPUT_OPTIONS
Animation command passed for a input options request.

SAVE_TREE

public static final java.lang.String SAVE_TREE
Animation command passed for a saving of the colors.

SAVE_ALL

public static final java.lang.String SAVE_ALL
Animation command passed for a saving of the colors for all trees.

RESET

public static final java.lang.String RESET
Animation command passed for the reseting of colors.

FUNCTION_CHANGE

public static final java.lang.String FUNCTION_CHANGE
Animation command passed for a function color change.

COLOR_SETTINGS_CHANGE

public static final java.lang.String COLOR_SETTINGS_CHANGE
Animation command passed for a color settings change.

COLOR_SCHEME_CHANGE

public static final java.lang.String COLOR_SCHEME_CHANGE
Animation command passed for a color scheme change.

COLOR_SETTINGS_ALL

public static final java.lang.String COLOR_SETTINGS_ALL
Animation command passed for color settings all request.

COLOR_SETTINGS

public static final java.lang.String COLOR_SETTINGS
Animation command passed for color settings request.

OPTION_PANEL

public static final int OPTION_PANEL
ID for an option panel.

CONTROL_OPTION_PANEL

public static final int CONTROL_OPTION_PANEL
ID for an control option panel.

MAIN_OPTION_PANEL

public static final int MAIN_OPTION_PANEL
ID for an main option panel.

ANIMATION_TOOLS_OPTION_PANEL

public static final int ANIMATION_TOOLS_OPTION_PANEL
ID for an animation tools option panel.

TREE_TOOLS_OPTION_PANEL

public static final int TREE_TOOLS_OPTION_PANEL
ID for an tree tools option panel.

TREE_TOOLS_ALL_OPTION_PANEL

public static final int TREE_TOOLS_ALL_OPTION_PANEL
ID for an tree tools all option panel.

COLOR_TOOLS_OPTION_PANEL

public static final int COLOR_TOOLS_OPTION_PANEL
ID for an color tools option panel.

DESKTOP_PANEL

public static final int DESKTOP_PANEL
ID for an desktop panel.
Constructor Detail

OptionEvent

public OptionEvent(java.lang.Object source,
                   int id,
                   java.lang.String command)
Constructs an OptionEvent object.
Parameters:
source - the object that originated the event
id - an integer that identifies the event
command - a string that may specify a command (possibly one of several) associated with the event

OptionEvent

public OptionEvent(java.lang.Object source,
                   int id,
                   java.lang.String command,
                   java.lang.Object value)
Constructs an OptionEvent object with the Object value.
Parameters:
source - the object that originated the event
id - an integer that identifies the event
command - a string that may specify a command (possibly one of several) associated with the event
value - the value of the Object passed
Method Detail

getActionCommand

public java.lang.String getActionCommand()
Returns the command string associated with this action. This string allows a "modal" component to specify one of several commands, depending on its state. The command string would identify the intended action.
Returns:
the string identifying the command for this event

getObjectValue

public java.lang.Object getObjectValue()
Returns the Object associated with the OptionEvent.
Returns:
the Object of the event