Package io.guise.framework.event
Class KeyPressEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.globalmentor.event.AbstractEvent
-
- All Implemented Interfaces:
com.globalmentor.event.Event
,FocusedInputEvent
,GestureInputEvent
,GuiseEvent
,InputEvent
,KeyboardEvent
,java.io.Serializable
public class KeyPressEvent extends AbstractKeyboardEvent
An event providing information on a keyboard key press.- Author:
- Garret Wilson
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyPressEvent(java.lang.Object source, KeyPressEvent keyPressEvent)
Copy constructor that specifies a different source.KeyPressEvent(java.lang.Object source, Key key, Key... keys)
Source constructor.KeyPressEvent(java.lang.Object source, KeystrokeInput keystrokeInput)
Keystroke input constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeystrokeInput
getInput()
-
Methods inherited from class io.guise.framework.event.AbstractKeyboardEvent
getKey
-
Methods inherited from class io.guise.framework.event.AbstractGestureInputEvent
getKeys, hasAltKey, hasControlKey, hasShiftKey
-
Methods inherited from class io.guise.framework.event.AbstractInputEvent
consume, isConsumed
-
Methods inherited from class io.guise.framework.event.AbstractGuiseEvent
getSession
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.guise.framework.event.GestureInputEvent
getKeys, hasAltKey, hasControlKey, hasShiftKey
-
Methods inherited from interface io.guise.framework.event.GuiseEvent
getSession
-
Methods inherited from interface io.guise.framework.event.InputEvent
consume, isConsumed
-
-
-
-
Constructor Detail
-
KeyPressEvent
public KeyPressEvent(java.lang.Object source, Key key, Key... keys)
Source constructor.- Parameters:
source
- The object on which the event initially occurred.key
- The key that was pressed.keys
- The keys that were pressed when this event was generated.- Throws:
java.lang.NullPointerException
- if the given source, key, and/or keys isnull
.
-
KeyPressEvent
public KeyPressEvent(java.lang.Object source, KeystrokeInput keystrokeInput)
Keystroke input constructor.- Parameters:
source
- The object on which the event initially occurred.keystrokeInput
- The keystroke input the properties of which will be copied.- Throws:
java.lang.NullPointerException
- if the given source and/or input isnull
.
-
KeyPressEvent
public KeyPressEvent(java.lang.Object source, KeyPressEvent keyPressEvent)
Copy constructor that specifies a different source.- Parameters:
source
- The object on which the event initially occurred.keyPressEvent
- The event the properties of which will be copied.- Throws:
java.lang.NullPointerException
- if the given source, key, and/or event isnull
.
-
-
Method Detail
-
getInput
public KeystrokeInput getInput()
- Returns:
- The input associated with this event, or
null
if there is no input associated with this event.
-
-