Package org.apache.batik.gvt.event
Class GraphicsNodeInputEvent
java.lang.Object
java.util.EventObject
org.apache.batik.gvt.event.GraphicsNodeEvent
org.apache.batik.gvt.event.GraphicsNodeInputEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GraphicsNodeKeyEvent
,GraphicsNodeMouseEvent
,GraphicsNodeMouseWheelEvent
The root event class for all graphics node-level input events.
- Version:
- $Id: GraphicsNodeInputEvent.java 1831615 2018-05-15 09:50:53Z ssteiner $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The alt-graph key modifier constant.static final int
The alt key modifier constant.static final int
The mouse button1 modifier constant.static final int
The mouse button2 modifier constant.static final int
The mouse button3 modifier constant.static final int
The caps lock constant.static final int
The control key modifier constant.static final int
The kana lock constant.(package private) int
The state of the key locks at the time the graphics node input event was fired.static final int
The meta key modifier constant.(package private) int
The state of the modifier keys at the time the graphics node input event was fired.static final int
The num lock constant.static final int
The scroll lock constant.static final int
The shift key modifier constant.(package private) long
The graphics node input events Time stamp.Fields inherited from class org.apache.batik.gvt.event.GraphicsNodeEvent
id
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
GraphicsNodeInputEvent
(GraphicsNode source, int id, long when, int modifiers, int lockState) Constructs a new graphics node input event.protected
GraphicsNodeInputEvent
(GraphicsNode source, InputEvent evt, int lockState) Constructs a new graphics node input event from an AWT InputEvent. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the lock state flags for this event.int
Returns the modifiers flag for this event.long
getWhen()
Returns the timestamp of when this event occurred.boolean
Returns whether or not the Alt modifier is down on this event.boolean
Returns whether or not the Alt-Graph modifier is down on this event.boolean
Returns whether or not the Control modifier is down on this event.boolean
Returns whether or not the Meta modifier is down on this event.boolean
Returns whether or not the Shift modifier is down on this event.Methods inherited from class org.apache.batik.gvt.event.GraphicsNodeEvent
consume, getGraphicsNode, getID, isConsumed
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
SHIFT_MASK
public static final int SHIFT_MASKThe shift key modifier constant.- See Also:
-
CTRL_MASK
public static final int CTRL_MASKThe control key modifier constant.- See Also:
-
META_MASK
public static final int META_MASKThe meta key modifier constant.- See Also:
-
ALT_MASK
public static final int ALT_MASKThe alt key modifier constant.- See Also:
-
ALT_GRAPH_MASK
public static final int ALT_GRAPH_MASKThe alt-graph key modifier constant.- See Also:
-
BUTTON1_MASK
public static final int BUTTON1_MASKThe mouse button1 modifier constant.- See Also:
-
BUTTON2_MASK
public static final int BUTTON2_MASKThe mouse button2 modifier constant.- See Also:
-
BUTTON3_MASK
public static final int BUTTON3_MASKThe mouse button3 modifier constant.- See Also:
-
CAPS_LOCK_MASK
public static final int CAPS_LOCK_MASKThe caps lock constant.- See Also:
-
NUM_LOCK_MASK
public static final int NUM_LOCK_MASKThe num lock constant.- See Also:
-
SCROLL_LOCK_MASK
public static final int SCROLL_LOCK_MASKThe scroll lock constant.- See Also:
-
KANA_LOCK_MASK
public static final int KANA_LOCK_MASKThe kana lock constant.- See Also:
-
when
long whenThe graphics node input events Time stamp. The time stamp is in UTC format that indicates when the input event was created. -
modifiers
int modifiersThe state of the modifier keys at the time the graphics node input event was fired. -
lockState
int lockStateThe state of the key locks at the time the graphics node input event was fired.
-
-
Constructor Details
-
GraphicsNodeInputEvent
protected GraphicsNodeInputEvent(GraphicsNode source, int id, long when, int modifiers, int lockState) Constructs a new graphics node input event.- Parameters:
source
- the graphics node where the event originatedid
- the id of this eventwhen
- the time the event occurredmodifiers
- the modifier keys down while event occurred
-
GraphicsNodeInputEvent
Constructs a new graphics node input event from an AWT InputEvent.- Parameters:
source
- the graphics node where the event originatedevt
- the AWT InputEvent triggering this event's creation
-
-
Method Details
-
isShiftDown
public boolean isShiftDown()Returns whether or not the Shift modifier is down on this event. -
isControlDown
public boolean isControlDown()Returns whether or not the Control modifier is down on this event. -
isMetaDown
public boolean isMetaDown()Returns whether or not the Meta modifier is down on this event. -
isAltDown
public boolean isAltDown()Returns whether or not the Alt modifier is down on this event. -
isAltGraphDown
public boolean isAltGraphDown()Returns whether or not the Alt-Graph modifier is down on this event. -
getWhen
public long getWhen()Returns the timestamp of when this event occurred. -
getModifiers
public int getModifiers()Returns the modifiers flag for this event. -
getLockState
public int getLockState()Returns the lock state flags for this event.
-