ibm.techexplorer.awt.event
Class InputEvent

java.lang.Object
  |
  +--ibm.techexplorer.util.EventObject
        |
        +--ibm.techexplorer.awt.AWTEvent
              |
              +--ibm.techexplorer.awt.event.InputEvent
Direct Known Subclasses:
KeyEvent, MouseEvent

public class InputEvent
extends AWTEvent

Description

This class is the superclass for the ibm.techexplorer.awt.event.KeyEvent and ibm.techexplorer.awt.event.MouseEvent events. Input events contain information about the set of modifier keys in the form of a bit vector. The state of a particular modifier key can be retrieved by using the mask for that modifier key. Possible modifier masks include : ALT_MASK, CTRL_MASK, META_MASK, SHIFT_MASK, BUTTON1_MASK, BUTTON2_MASK, and BUTTON3_MASK.

Current Restriction: Unlike InputEvents in Java 1.1, techexplorer instance input events are delivered to techexplorer before they are processed by listeners. Hence, this version of the techexplorer Java API does not allow listeners to consume input events. techexplorer will process input events in the aforementioned manner unless the event has been disabled by using the disableEvent method found in ibm.techexplorer.techexplorer

See Also:
AWTEvent, KeyEvent, MouseEvent

Field Summary
static int ALT_MASK
          Modifier mask used to determine the state of the alt key.
static int BUTTON1_MASK
          Modifier mask used to determine if button1 was pressed.
static int BUTTON2_MASK
          Modifier mask used to determine if button2 was pressed.
static int BUTTON3_MASK
          Modifier mask used to determine if button3 was pressed.
static int CTRL_MASK
          Modifier mask used to determine the state of the ctrl key.
static int META_MASK
          Modifier mask used to determine the state of the meta key.
protected  int modifiers
           
static int SHIFT_MASK
          Modifier mask used to determine the state of the shift key.
 
Fields inherited from class ibm.techexplorer.awt.AWTEvent
FOCUS_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK
 
Fields inherited from class ibm.techexplorer.util.EventObject
documentName, id, listenerClass, objectName, source
 
Constructor Summary
InputEvent()
           
 
Method Summary
 int getModifiers()
          Retrieve the modifiers flag for this event.
 boolean isAltDown()
          Determine whether or not the alt modifier is down on this event.
 boolean isControlDown()
          Determine whether or not the ctrl modifier is down on this event.
 boolean isShiftDown()
          Determine whether or not the shift modifier is down on this event.
 
Methods inherited from class ibm.techexplorer.util.EventObject
getDocumentName, getID, getListenerClass, getObjectName, getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modifiers

protected int modifiers

ALT_MASK

public static final int ALT_MASK
Modifier mask used to determine the state of the alt key.

BUTTON1_MASK

public static final int BUTTON1_MASK
Modifier mask used to determine if button1 was pressed.

BUTTON2_MASK

public static final int BUTTON2_MASK
Modifier mask used to determine if button2 was pressed.

BUTTON3_MASK

public static final int BUTTON3_MASK
Modifier mask used to determine if button3 was pressed.

CTRL_MASK

public static final int CTRL_MASK
Modifier mask used to determine the state of the ctrl key.

META_MASK

public static final int META_MASK
Modifier mask used to determine the state of the meta key.

SHIFT_MASK

public static final int SHIFT_MASK
Modifier mask used to determine the state of the shift key.
Constructor Detail

InputEvent

public InputEvent()
Method Detail

getModifiers

public int getModifiers()
Retrieve the modifiers flag for this event.
Returns:
The modifiers flag for this event.

isAltDown

public boolean isAltDown()
Determine whether or not the alt modifier is down on this event.
Returns:
true if alt key is pressed, false otherwise.

isControlDown

public boolean isControlDown()
Determine whether or not the ctrl modifier is down on this event.
Returns:
true if ctrl key is pressed, false otherwise.

isShiftDown

public boolean isShiftDown()
Determine whether or not the shift modifier is down on this event.
Returns:
true if shift key is pressed, false otherwise.