com.threerings.opengl.gui.event
Class InputEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.threerings.opengl.gui.event.Event
          extended by com.threerings.opengl.gui.event.InputEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ActionEvent, ControllerEvent, KeyEvent, MouseEvent

public class InputEvent
extends Event

Contains information common to all input (keyboard and mouse) events. This includes the state of the modifier keys at the time the event was generated.

See Also:
Serialized Form

Field Summary
static int ALT_DOWN_MASK
          A modifier mask indicating that the alt key was down at the time this event was generated.
static int BUTTON1_DOWN_MASK
          A modifier mask indicating that the first mouse button was down at the time this event was generated.
static int BUTTON2_DOWN_MASK
          A modifier mask indicating that the second mouse button was down at the time this event was generated.
static int BUTTON3_DOWN_MASK
          A modifier mask indicating that the third mouse button was down at the time this event was generated.
static int CTRL_DOWN_MASK
          A modifier mask indicating that the control key was down at the time this event was generated.
static int META_DOWN_MASK
          A modifier mask indicating that the meta key (Windows Logo key on some keyboards) was down at the time this event was generated.
static int SHIFT_DOWN_MASK
          A modifier mask indicating that the shift key was down at the time this event was generated.
 
Method Summary
 int getModifiers()
          Returns the modifier mask associated with this event.
 boolean isAltDown()
          Determines whether the alt key was down at the time this event was generated.
 boolean isControlDown()
          Determines whether the control key was down at the time this event was generated.
 boolean isMetaDown()
          Determines whether the meta key was down at the time this event was generated.
 boolean isShiftDown()
          Determines whether the shift key was down at the time this event was generated.
 
Methods inherited from class com.threerings.opengl.gui.event.Event
consume, dispatch, getWhen, isConsumed, propagateUpHierarchy, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUTTON1_DOWN_MASK

public static final int BUTTON1_DOWN_MASK
A modifier mask indicating that the first mouse button was down at the time this event was generated.

See Also:
Constant Field Values

BUTTON2_DOWN_MASK

public static final int BUTTON2_DOWN_MASK
A modifier mask indicating that the second mouse button was down at the time this event was generated.

See Also:
Constant Field Values

BUTTON3_DOWN_MASK

public static final int BUTTON3_DOWN_MASK
A modifier mask indicating that the third mouse button was down at the time this event was generated.

See Also:
Constant Field Values

SHIFT_DOWN_MASK

public static final int SHIFT_DOWN_MASK
A modifier mask indicating that the shift key was down at the time this event was generated.

See Also:
Constant Field Values

CTRL_DOWN_MASK

public static final int CTRL_DOWN_MASK
A modifier mask indicating that the control key was down at the time this event was generated.

See Also:
Constant Field Values

ALT_DOWN_MASK

public static final int ALT_DOWN_MASK
A modifier mask indicating that the alt key was down at the time this event was generated.

See Also:
Constant Field Values

META_DOWN_MASK

public static final int META_DOWN_MASK
A modifier mask indicating that the meta key (Windows Logo key on some keyboards) was down at the time this event was generated.

See Also:
Constant Field Values
Method Detail

getModifiers

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


isShiftDown

public boolean isShiftDown()
Determines whether the shift key was down at the time this event was generated.


isControlDown

public boolean isControlDown()
Determines whether the control key was down at the time this event was generated.


isAltDown

public boolean isAltDown()
Determines whether the alt key was down at the time this event was generated.


isMetaDown

public boolean isMetaDown()
Determines whether the meta key was down at the time this event was generated.



Copyright © 2011. All Rights Reserved.