javax.rad.ui.event
Class UIActionEvent

java.lang.Object
  extended by javax.rad.ui.event.UIEvent
      extended by javax.rad.ui.event.UIActionEvent

public class UIActionEvent
extends UIEvent

Platform and technology independent action event definition. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .

See Also:
ActionEvent

Field Summary
static int ACTION_FIRST
          The first number in the range of ids used for action events.
static int ACTION_LAST
          The last number in the range of ids used for action events.
static int ACTION_PERFORMED
          This event id indicates that a meaningful action occured.
 
Fields inherited from class javax.rad.ui.event.UIEvent
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
 
Constructor Summary
UIActionEvent(IComponent pSource, int pId, long pWhen, int pModifiers, String pActionCommand)
          Creates a new instance of UIActionEvent.
 
Method Summary
protected  void checkId(int pId)
          Checks if the current Instance of UIEvent allows the given id.
 String getActionCommand()
          Returns the command string associated with this action.
 
Methods inherited from class javax.rad.ui.event.UIEvent
getId, getModifiers, getSource, getWhen, isModifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_FIRST

public static final int ACTION_FIRST
The first number in the range of ids used for action events.

See Also:
Constant Field Values

ACTION_PERFORMED

public static final int ACTION_PERFORMED
This event id indicates that a meaningful action occured.

See Also:
Constant Field Values

ACTION_LAST

public static final int ACTION_LAST
The last number in the range of ids used for action events.

See Also:
Constant Field Values
Constructor Detail

UIActionEvent

public UIActionEvent(IComponent pSource,
                     int pId,
                     long pWhen,
                     int pModifiers,
                     String pActionCommand)
Creates a new instance of UIActionEvent.

Parameters:
pSource - the Source of this UIActionEvent.
pId - the Id of this UIActionEvent.
pWhen - the time the event occurred
pModifiers - represents the modifier keys and mouse buttons down while the event occurred
pActionCommand - nonlocalized string that gives more details of what actually caused the event
Method Detail

checkId

protected void checkId(int pId)
Checks if the current Instance of UIEvent allows the given id.

Overrides:
checkId in class UIEvent
Parameters:
pId - the Id of this UIEvent.

getActionCommand

public 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. For example, a single button might toggle between "show details" and "hide details". The source object and the event would be the same in each case, but the command string would identify the intended action.

Note that if a null command string was passed to the constructor for this ActionEvent, this this method returns null.

Returns:
the string identifying the command for this event


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.