org.graffiti.plugin.view.interactive
Class ModifiableUserGesture

java.lang.Object
  extended by org.graffiti.plugin.view.interactive.ModifiableUserGesture
All Implemented Interfaces:
UserGesture
Direct Known Subclasses:
KeyboardGesture, MouseGesture

public class ModifiableUserGesture
extends Object
implements UserGesture

Represents a user gesture that is aware of the state of the modal keys and mouse buttons. It is provided for convenience and its use by InteractiveViews is not prescribed.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner
See Also:
InputEvent.getModifiersEx()

Constructor Summary
protected ModifiableUserGesture(boolean isAltDown, boolean isControlDown, boolean isMetaDown, boolean isShiftDown, boolean isLeftMouseButtonDown, boolean isMiddleMouseButtonDown, boolean isRightMouseButtonDown)
          Constructs a modifiable user gesture.
protected ModifiableUserGesture(int modifierMask)
          Constructs a ModifiableUserGesture.
 
Method Summary
 boolean isAltDown()
          Returns whether the Alt modifier is down on this user gesture.
 boolean isControlDown()
          Returns whether the Control modifier is down on this user gesture.
 boolean isLeftMouseButtonDown()
          Returns whether the left mouse button is down on this user gesture.
 boolean isMetaDown()
          Returns whether the Meta modifier is down on this user gesture.
 boolean isMiddleMouseButtonDown()
          Returns whether the middle mouse button is down on this user gesture.
 boolean isRightMouseButtonDown()
          Returns whether the right mouse button is down on this user gesture.
 boolean isShiftDown()
          Returns whether the Shift modifier is down on this user gesture.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifiableUserGesture

protected ModifiableUserGesture(boolean isAltDown,
                                boolean isControlDown,
                                boolean isMetaDown,
                                boolean isShiftDown,
                                boolean isLeftMouseButtonDown,
                                boolean isMiddleMouseButtonDown,
                                boolean isRightMouseButtonDown)
Constructs a modifiable user gesture.

Parameters:
isAltDown - specifies whether the Alt modifier is down on this user gesture.
isControlDown - specifies whether the Control modifier is down on this user gesture.
isMetaDown - specifies whether the Meta modifier is down on this user gesture.
isShiftDown - specifies whether the Shift modifier is down on this user gesture.
isLeftMouseButtonDown - specifies whether the left mouse button is down on this user gesture.
isMiddleMouseButtonDown - specifies whether the middle mouse button is down on this user gesture.
isRightMouseButtonDown - specifies whether the Meta modifier is down on this user gesture.

ModifiableUserGesture

protected ModifiableUserGesture(int modifierMask)
Constructs a ModifiableUserGesture.

Parameters:
modifierMask - a bit set representing the state of the modifiers. It is interpreted like the extended modifier mask of InputEvent.
See Also:
InputEvent.getModifiersEx()
Method Detail

isAltDown

public boolean isAltDown()
Returns whether the Alt modifier is down on this user gesture.

Returns:
whether the Alt modifier is down on this user gesture.

isControlDown

public boolean isControlDown()
Returns whether the Control modifier is down on this user gesture.

Returns:
whether the Control modifier is down on this user gesture.

isMetaDown

public boolean isMetaDown()
Returns whether the Meta modifier is down on this user gesture.

Returns:
whether the Meta modifier is down on this user gesture.

isShiftDown

public boolean isShiftDown()
Returns whether the Shift modifier is down on this user gesture.

Returns:
whether the Shift modifier is down on this user gesture.

isLeftMouseButtonDown

public boolean isLeftMouseButtonDown()
Returns whether the left mouse button is down on this user gesture.

Returns:
whether the left mouse button is down on this user gesture.

isMiddleMouseButtonDown

public boolean isMiddleMouseButtonDown()
Returns whether the middle mouse button is down on this user gesture.

Returns:
whether the middle mouse button is down on this user gesture.

isRightMouseButtonDown

public boolean isRightMouseButtonDown()
Returns whether the right mouse button is down on this user gesture.

Returns:
whether the right mouse button is down on this user gesture.


Generated at 2012-05-30 11:00:36 PM CEST