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
public class KeystrokeInput extends AbstractGestureInput implements KeyboardInput
An encapsulation of key stroke input.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description KeystrokeInput(Key key, Key... keys)
Key and keys constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Key
getKey()
int
hashCode()
java.lang.String
toString()
-
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
-
-
-
-
Method Detail
-
getKey
public Key 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
public boolean equals(java.lang.Object object)
Besides the default checks, this version ensures that the keys are equal.
- Overrides:
equals
in classcom.globalmentor.model.AbstractHashObject
-
toString
public java.lang.String toString()
- Overrides:
toString
in classcom.globalmentor.model.AbstractHashObject
-
-