public class NativeInputEvent extends EventObject
NativeKeyListener
,
NativeMouseListener
,
NativeMouseMotionListener
,
NativeMouseWheelListener
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
ALT_L_MASK
The left alt key modifier constant.
|
static int |
ALT_MASK
Either the right or left alt key modifier constant.
|
static int |
ALT_R_MASK
The right alt key modifier constant.
|
static int |
BUTTON1_MASK
The Button1 modifier constant.
|
static int |
BUTTON2_MASK
The Button2 modifier constant.
|
static int |
BUTTON3_MASK
The Button3 modifier constant.
|
static int |
BUTTON4_MASK
The Button4 modifier constant.
|
static int |
BUTTON5_MASK
The Button5 modifier constant.
|
static int |
CAPS_LOCK_MASK
The Caps Lock modifier constant.
|
static int |
CTRL_L_MASK
The left ctrl key modifier constant.
|
static int |
CTRL_MASK
Either the right or left ctrl key modifier constant.
|
static int |
CTRL_R_MASK
The right ctrl key modifier constant.
|
static int |
META_L_MASK
The left meta key modifier constant.
|
static int |
META_MASK
Either the right or left meta key modifier constant.
|
static int |
META_R_MASK
The right meta key modifier constant.
|
static int |
NUM_LOCK_MASK
The Number Lock modifier constant.
|
static int |
SCROLL_LOCK_MASK
The Scroll Lock modifier constant.
|
static int |
SHIFT_L_MASK
The left shift key modifier constant.
|
static int |
SHIFT_MASK
Either the right or left shift key modifier constant.
|
static int |
SHIFT_R_MASK
The right shift key modifier constant.
|
source
Constructor and Description |
---|
NativeInputEvent(Class<GlobalScreen> source,
int id,
int modifiers)
Instantiates a new native input event.
|
Modifier and Type | Method and Description |
---|---|
int |
getID()
Gets the event type.
|
int |
getModifiers()
Gets the modifier flags for this event.
|
static String |
getModifiersText(int modifiers)
Gets a
String describing the modifier flags, such as
"Button1", or "Ctrl+Alt". |
long |
getWhen()
Gets the platform dependent native interval for chronological event sequencing.
|
String |
paramString()
Gets a
String representation of this event. |
void |
setModifiers(int modifiers)
Sets the modifier flags for this event.
|
getSource, toString
public static final int SHIFT_L_MASK
public static final int CTRL_L_MASK
public static final int META_L_MASK
public static final int ALT_L_MASK
public static final int SHIFT_R_MASK
public static final int CTRL_R_MASK
public static final int META_R_MASK
public static final int ALT_R_MASK
public static final int SHIFT_MASK
public static final int CTRL_MASK
public static final int META_MASK
public static final int ALT_MASK
public static final int BUTTON1_MASK
public static final int BUTTON2_MASK
public static final int BUTTON3_MASK
public static final int BUTTON4_MASK
public static final int BUTTON5_MASK
public static final int NUM_LOCK_MASK
public static final int CAPS_LOCK_MASK
public static final int SCROLL_LOCK_MASK
public NativeInputEvent(Class<GlobalScreen> source, int id, int modifiers)
source
- The source of the event.id
- The type of event.modifiers
- the modifier keys down during event.
NativeInputEvent
_MASK modifiers should be used as they are
not compatible with the extended _DOWN_MASK or the old _MASK
InputEvent
modifiers.public int getID()
public long getWhen()
public int getModifiers()
public void setModifiers(int modifiers)
modifiers
- the new modifier flagspublic static String getModifiersText(int modifiers)
String
describing the modifier flags, such as
"Button1", or "Ctrl+Alt". These strings can be localized by changing the
awt.properties file.modifiers
- a modifier mask describing the modifier keys and mouse
buttons of an event.public String paramString()
String
representation of this event. This method is
useful for event-logging and debugging.Copyright © 2006-2017 ${project.vendor}. All Rights Received.