jcontrol.ui.vole.event
Class ActionEvent

java.lang.Object
  extended by jcontrol.ui.vole.event.ActionEvent

public class ActionEvent
extends 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.

(c) Copyright 2003-2007 DOMOLOGIC GmbH

Since:
JCVM8, V2.0
See Also:
KeyEvent, Component, Container

Field Summary
static int BUTTON_PRESSED
          A button was pressed
protected  String command
           
static int ITEM_SELECTED
          A list or combo box item was selected
static int MENU_ACTION
          A menu item was selected
protected  Component source
           
static int STATE_CHANGED
          An component's state was changed
protected  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, String command)
          Constructs an ActionEvent.
 
Method Summary
 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, getClass, notifyAll, toString, wait
 

Field Detail

BUTTON_PRESSED

public static final int BUTTON_PRESSED
A button was pressed

See Also:
Constant Field Values

MENU_ACTION

public static final int MENU_ACTION
A menu item was selected

See Also:
Constant Field Values

ITEM_SELECTED

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

See Also:
Constant Field Values

VALUE_CHANGED

public static final int VALUE_CHANGED
A slider value was changed

See Also:
Constant Field Values

STATE_CHANGED

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

See Also:
Constant Field Values

source

protected Component source

command

protected String command

type

protected int type
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,
                   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

getSource

public Component getSource()
Get event's source.


getActionCommand

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


getType

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