org.graffiti.plugin.view.interactive
Class MouseButtonGesture

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

public class MouseButtonGesture
extends MouseGesture

User gesture that involves a mouse button. It is provided for convenience and its use by InteractiveViews is not prescribed.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner
See Also:
UserGesture

Constructor Summary
protected MouseButtonGesture(Point2D position, int modifierMask, int buttonId)
          Constructs a MouseButtonGesture.
protected MouseButtonGesture(Point2D position, int modifierMask, MouseButton button)
          Constructs a MouseButtonGesture.
 
Method Summary
 MouseButton getButton()
          Returns the mouse button that was pressed or released.
 
Methods inherited from class org.graffiti.plugin.view.interactive.MouseGesture
getPosition
 
Methods inherited from class org.graffiti.plugin.view.interactive.ModifiableUserGesture
isAltDown, isControlDown, isLeftMouseButtonDown, isMetaDown, isMiddleMouseButtonDown, isRightMouseButtonDown, isShiftDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseButtonGesture

protected MouseButtonGesture(Point2D position,
                             int modifierMask,
                             int buttonId)
Constructs a MouseButtonGesture.

Parameters:
position - the position of the mouse cursor. The referred coordinate system is left to the calling InteractiveView.
modifierMask - a bit set representing the state of the modifiers. It is interpreted like the extended modifier mask of InputEvent.
buttonId - the id of the button that was pressed or released, as used by MouseEvent.getButton().

MouseButtonGesture

protected MouseButtonGesture(Point2D position,
                             int modifierMask,
                             MouseButton button)
Constructs a MouseButtonGesture.

Parameters:
position - the position of the mouse cursor. The referred coordinate system is left to the calling InteractiveView.
modifierMask - a bit set representing the state of the modifiers. It is interpreted like the extended modifier mask of InputEvent.
button - the mouse button that was pressed or released.
Method Detail

getButton

public MouseButton getButton()
Returns the mouse button that was pressed or released.

Returns:
the mouse button that was pressed or released.


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