Package io.guise.framework.input
Class AbstractGestureInput
- java.lang.Object
-
- com.globalmentor.model.AbstractHashObject
-
- io.guise.framework.input.AbstractGestureInput
-
- All Implemented Interfaces:
GestureInput
,Input
- Direct Known Subclasses:
AbstractMouseInput
,KeystrokeInput
public abstract class AbstractGestureInput extends com.globalmentor.model.AbstractHashObject implements GestureInput
An abstract encapsulation of user input from a gesture.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description AbstractGestureInput(Key... keys)
Keys constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Key>
getKeys()
boolean
hasAltKey()
Determines whether an Alt key was pressed when this input occurred.boolean
hasControlKey()
Determines whether a Control key was pressed when this input occurred.boolean
hasShiftKey()
Determines whether a Shift key was pressed when this input occurred.
-
-
-
Constructor Detail
-
AbstractGestureInput
public AbstractGestureInput(Key... keys)
Keys constructor.- Parameters:
keys
- The keys that were pressed when this input occurred.- Throws:
java.lang.NullPointerException
- if the given keys isnull
.
-
-
Method Detail
-
getKeys
public java.util.Set<Key> getKeys()
- Specified by:
getKeys
in interfaceGestureInput
- Returns:
- The keys that were pressed when this input occurred.
-
hasAltKey
public boolean hasAltKey()
Description copied from interface:GestureInput
Determines whether an Alt key was pressed when this input occurred.- Specified by:
hasAltKey
in interfaceGestureInput
- Returns:
true
if one of the Alt keys were pressed when this input occurred.- See Also:
GestureInput.getKeys()
-
hasControlKey
public boolean hasControlKey()
Description copied from interface:GestureInput
Determines whether a Control key was pressed when this input occurred.- Specified by:
hasControlKey
in interfaceGestureInput
- Returns:
true
if one of the Control keys were pressed when this input occurred.- See Also:
GestureInput.getKeys()
-
hasShiftKey
public boolean hasShiftKey()
Description copied from interface:GestureInput
Determines whether a Shift key was pressed when this input occurred.- Specified by:
hasShiftKey
in interfaceGestureInput
- Returns:
true
if one of the Shift keys were pressed when this input occurred.- See Also:
GestureInput.getKeys()
-
-