javax.rad.ui.event
Class UIEvent

java.lang.Object
  extended by javax.rad.ui.event.UIEvent
Direct Known Subclasses:
UIActionEvent, UIComponentEvent, UIKeyEvent, UIMouseEvent, UITabsetEvent, UIWindowEvent

public abstract class UIEvent
extends Object

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

See Also:
AWTEvent

Field Summary
static int ALT_GRAPH_MASK
          The AltGraph key modifier constant.
static int ALT_MASK
          The Alt key modifier constant.
static int BUTTON1_MASK
          The Mouse Button1 modifier constant.
static int BUTTON2_MASK
          The Mouse Button2 modifier constant.
static int BUTTON3_MASK
          The Mouse Button3 modifier constant.
static int CTRL_MASK
          The Control key modifier constant.
static int META_MASK
          The Meta key modifier constant.
static int SHIFT_MASK
          The Shift key modifier constant.
 
Constructor Summary
protected UIEvent(IComponent pSource, int pId, long pWhen, int pModifiers)
          Creates a new instance of UIEvent.
 
Method Summary
protected  void checkId(int pId)
          Checks if the current Instance of UIEvent allows the given id.
 int getId()
          The id of this Event.
 int getModifiers()
          Returns the modifier mask for this event.
 IComponent getSource()
          The object on which the Event initially occurred.
 long getWhen()
          Returns the timestamp of when this event occurred.
 boolean isModifier(int pModifier)
          True, if the given modifiers are set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK
The Shift key modifier constant. It is recommended that SHIFT_DOWN_MASK be used instead.

See Also:
Constant Field Values

CTRL_MASK

public static final int CTRL_MASK
The Control key modifier constant. It is recommended that CTRL_DOWN_MASK be used instead.

See Also:
Constant Field Values

META_MASK

public static final int META_MASK
The Meta key modifier constant. It is recommended that META_DOWN_MASK be used instead.

See Also:
Constant Field Values

ALT_MASK

public static final int ALT_MASK
The Alt key modifier constant. It is recommended that ALT_DOWN_MASK be used instead.

See Also:
Constant Field Values

ALT_GRAPH_MASK

public static final int ALT_GRAPH_MASK
The AltGraph key modifier constant.

See Also:
Constant Field Values

BUTTON1_MASK

public static final int BUTTON1_MASK
The Mouse Button1 modifier constant. It is recommended that BUTTON1_DOWN_MASK be used instead.

See Also:
Constant Field Values

BUTTON2_MASK

public static final int BUTTON2_MASK
The Mouse Button2 modifier constant. It is recommended that BUTTON2_DOWN_MASK be used instead. Note that BUTTON2_MASK has the same value as ALT_MASK.

See Also:
Constant Field Values

BUTTON3_MASK

public static final int BUTTON3_MASK
The Mouse Button3 modifier constant. Note that BUTTON3_MASK has the same value as META_MASK.

See Also:
Constant Field Values
Constructor Detail

UIEvent

protected UIEvent(IComponent pSource,
                  int pId,
                  long pWhen,
                  int pModifiers)
Creates a new instance of UIEvent.

Parameters:
pSource - the Source of this UIEvent.
pId - the Id of this UIEvent.
pWhen - the time the event occurred
pModifiers - represents the modifier keys and mouse buttons down while the event occurred
Method Detail

checkId

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

Parameters:
pId - the Id of this UIEvent.

getSource

public IComponent getSource()
The object on which the Event initially occurred.

Returns:
the object on which the Event initially occurred.

getId

public int getId()
The id of this Event.

Returns:
the id of this Event.

getWhen

public long getWhen()
Returns the timestamp of when this event occurred.

Returns:
the timestamp of when this event occurred.

getModifiers

public int getModifiers()
Returns the modifier mask for this event.

Returns:
the modifier mask for this event.

isModifier

public boolean isModifier(int pModifier)
True, if the given modifiers are set.

Parameters:
pModifier - the modifiers to test.
Returns:
true, if the given modifiers are set.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.