com.guiseframework.input
Class AbstractGestureInput

java.lang.Object
  extended by com.globalmentor.model.AbstractHashObject
      extended by com.guiseframework.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
AbstractGestureInput(Key... keys)
          Keys constructor.
 
Method Summary
 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.
 
Methods inherited from class com.globalmentor.model.AbstractHashObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 is null.
Method Detail

getKeys

public java.util.Set<Key> getKeys()
Specified by:
getKeys in interface GestureInput
Returns:
The keys that were pressed when this input occurred.

hasAltKey

public boolean hasAltKey()
Determines whether an Alt key was pressed when this input occurred.

Specified by:
hasAltKey in interface GestureInput
Returns:
true if one of the Alt keys were pressed when this input occurred.
See Also:
getKeys()

hasControlKey

public boolean hasControlKey()
Determines whether a Control key was pressed when this input occurred.

Specified by:
hasControlKey in interface GestureInput
Returns:
true if one of the Control keys were pressed when this input occurred.
See Also:
getKeys()

hasShiftKey

public boolean hasShiftKey()
Determines whether a Shift key was pressed when this input occurred.

Specified by:
hasShiftKey in interface GestureInput
Returns:
true if one of the Shift keys were pressed when this input occurred.
See Also:
getKeys()


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.