jcontrol.ui.vole.event
Class ActionEvent

java.lang.Object
  |
  +--jcontrol.ui.vole.event.ActionEvent

public class ActionEvent
extends java.lang.Object

A semantic event which indicates that a component-defined action occured. This event is generated by a component (such as a Button) when the component-specific action occurs (such as being pressed). The event is passed to the parent container that itself may pass it to it's parent object.

Since:
Yogi2
Version:
1.0
Author:
Marcus Timmermann
See Also:
KeyEvent, Component, Container

Field Summary
static int BUTTON_PRESSED
          A button was pressed
(package private)  java.lang.String command
           
static int ITEM_SELECTED
          A list or combo box item was selected
static int MENU_ACTION
          A menu item was selected
(package private)  Component source
           
static int STATE_CHANGED
          An component's state was changed
(package private)  int type
           
static int VALUE_CHANGED
          A slider value was changed
 
Constructor Summary
ActionEvent(Component source, int type)
          Constructs an ActionEvent.
ActionEvent(Component source, int type, java.lang.String command)
          Constructs an ActionEvent.
 
Method Summary
 java.lang.String getActionCommand()
          Get event's action command (may be null)
 Component getSource()
          Get event's source.
 int getType()
          Get event's action type (may be undefined)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, notifyAll, wait
 

Field Detail

BUTTON_PRESSED

public static final int BUTTON_PRESSED
A button was pressed

See Also:
Constant Field Values

command

java.lang.String command

ITEM_SELECTED

public static final int ITEM_SELECTED
A list or combo box item was selected

See Also:
Constant Field Values

MENU_ACTION

public static final int MENU_ACTION
A menu item was selected

See Also:
Constant Field Values

source

Component source

STATE_CHANGED

public static final int STATE_CHANGED
An component's state was changed

See Also:
Constant Field Values

type

int type

VALUE_CHANGED

public static final int VALUE_CHANGED
A slider value was changed

See Also:
Constant Field Values
Constructor Detail

ActionEvent

public ActionEvent(Component source,
                   int type)
Constructs an ActionEvent.

Parameters:
source - the source component that generated the event.
type - the event type, such as BUTTON_PRESSED.

ActionEvent

public ActionEvent(Component source,
                   int type,
                   java.lang.String command)
Constructs an ActionEvent.

Parameters:
source - the source component that generated the event.
type - the event type, such as BUTTON_PRESSED.
command - a String representing the command of this event
Method Detail

getActionCommand

public java.lang.String getActionCommand()
Get event's action command (may be null)


getSource

public Component getSource()
Get event's source.


getType

public int getType()
Get event's action type (may be undefined)