Package io.guise.framework.input
Class KeystrokeInput
java.lang.Object
com.globalmentor.model.AbstractHashObject
io.guise.framework.input.AbstractGestureInput
io.guise.framework.input.KeystrokeInput
- All Implemented Interfaces:
GestureInput
,Input
,KeyboardInput
An encapsulation of key stroke input.
- Author:
- Garret Wilson
-
Constructor Summary
-
Method Summary
Methods inherited from class io.guise.framework.input.AbstractGestureInput
getKeys, hasAltKey, hasControlKey, hasShiftKey
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.guise.framework.input.GestureInput
getKeys, hasAltKey, hasControlKey, hasShiftKey
-
Constructor Details
-
KeystrokeInput
Key and keys constructor.- Parameters:
key
- The key that was pressed.keys
- The keys that were pressed when this input occurred.- Throws:
NullPointerException
- if the given key and/or keys isnull
.
-
-
Method Details
-
getKey
- Returns:
- The key that was pressed.
-
hashCode
public int hashCode()This version extends the hash code of the underlying objects with the the key.
- Overrides:
hashCode
in classcom.globalmentor.model.AbstractHashObject
-
equals
Besides the default checks, this version ensures that the keys are equal.
- Overrides:
equals
in classcom.globalmentor.model.AbstractHashObject
-
toString
- Overrides:
toString
in classcom.globalmentor.model.AbstractHashObject
-