fr.lri.swingstates.canvas
Class CStateMachine.WheelOnTag

java.lang.Object
  extended by fr.lri.swingstates.sm.Transition
      extended by fr.lri.swingstates.sm.transitions.Event
          extended by fr.lri.swingstates.sm.transitions.EventOnPosition
              extended by fr.lri.swingstates.canvas.CStateMachine.EventOnShape
                  extended by fr.lri.swingstates.canvas.CStateMachine.EventOnTag
                      extended by fr.lri.swingstates.canvas.CStateMachine.MouseOnTag
                          extended by fr.lri.swingstates.canvas.CStateMachine.WheelOnTag
Enclosing class:
CStateMachine

public class CStateMachine.WheelOnTag
extends CStateMachine.MouseOnTag

A transition triggered by a mouse wheel event with no button pressed on a CShape with a given tag.

Author:
Caroline Appert

Constructor Summary
CStateMachine.WheelOnTag(java.lang.Class tagClass)
          Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape that loops on the current state.
CStateMachine.WheelOnTag(java.lang.Class tagClass, int modifier)
          Builds a transition triggered by a mouse wheel event on a tagged CShape that loops on the current state.
CStateMachine.WheelOnTag(java.lang.Class tagClass, int modifier, java.lang.String outState)
          Builds a transition triggered by a mouse wheel event on a tagged CShape.
CStateMachine.WheelOnTag(java.lang.Class tagClass, java.lang.String outState)
          Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape.
CStateMachine.WheelOnTag(CTag tag)
          Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape that loops on the current state.
CStateMachine.WheelOnTag(CTag tag, int modifier)
          Builds a transition triggered by a mouse wheel event on a tagged CShape that loops on the current state.
CStateMachine.WheelOnTag(CTag tag, int modifier, java.lang.String outState)
          Builds a transition triggered by a mouse wheel event on a tagged CShape.
CStateMachine.WheelOnTag(CTag tag, java.lang.String outState)
          Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape.
CStateMachine.WheelOnTag(java.lang.String tagName)
          Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape that loops on the current state.
CStateMachine.WheelOnTag(java.lang.String tagName, int modifier)
          Builds a transition triggered by a mouse wheel event on a tagged CShape that loops on the current state.
CStateMachine.WheelOnTag(java.lang.String tagName, int modifier, java.lang.String outState)
          Builds a transition triggered by a mouse wheel event on a tagged CShape.
CStateMachine.WheelOnTag(java.lang.String tagName, java.lang.String outState)
          Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape.
 
Method Summary
 int getScrollAmount()
           
 int getScrollType()
           
 int getUnitsToScroll()
           
 int getWheelRotation()
           
 boolean matches(java.util.EventObject eventObject)
          Tests if an event can trigger that transition.
 
Methods inherited from class fr.lri.swingstates.canvas.CStateMachine.MouseOnTag
getButton, getInputEvent, getMouseEvent, getPoint, getShape, toString
 
Methods inherited from class fr.lri.swingstates.canvas.CStateMachine.EventOnTag
getTag, getTagName
 
Methods inherited from class fr.lri.swingstates.sm.Transition
action, getEvent, getInputState, getOutputState, guard, oldToString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.String tagName)
Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape that loops on the current state.

Parameters:
tagName - The name of the tag

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.Class tagClass)
Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape that loops on the current state.

Parameters:
tagClass - The class of the tag

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(CTag tag)
Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape that loops on the current state.

Parameters:
tag - The tag

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.String tagName,
                                int modifier)
Builds a transition triggered by a mouse wheel event on a tagged CShape that loops on the current state.

Parameters:
tagName - The name of the tag
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.Class tagClass,
                                int modifier)
Builds a transition triggered by a mouse wheel event on a tagged CShape that loops on the current state.

Parameters:
tagClass - The class of the tag
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(CTag tag,
                                int modifier)
Builds a transition triggered by a mouse wheel event on a tagged CShape that loops on the current state.

Parameters:
tag - The tag
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.String tagName,
                                java.lang.String outState)
Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape.

Parameters:
tagName - The name of the tag
outState - The name of the output state

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.Class tagClass,
                                java.lang.String outState)
Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape.

Parameters:
tagClass - The class of the tag
outState - The name of the output state

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(CTag tag,
                                java.lang.String outState)
Builds a transition triggered by a mouse wheel event with any modifier on a tagged CShape.

Parameters:
tag - The tag
outState - The name of the output state

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.String tagName,
                                int modifier,
                                java.lang.String outState)
Builds a transition triggered by a mouse wheel event on a tagged CShape.

Parameters:
tagName - The name of the tag
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
outState - The name of the output state

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(java.lang.Class tagClass,
                                int modifier,
                                java.lang.String outState)
Builds a transition triggered by a mouse wheel event on a tagged CShape.

Parameters:
tagClass - The class of the tag
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
outState - The name of the output state

CStateMachine.WheelOnTag

public CStateMachine.WheelOnTag(CTag tag,
                                int modifier,
                                java.lang.String outState)
Builds a transition triggered by a mouse wheel event on a tagged CShape.

Parameters:
tag - The tag
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
outState - The name of the output state
Method Detail

getScrollAmount

public int getScrollAmount()
Returns:
the number of units that should be scrolled in response to this event.
See Also:
MouseWheelEvent.getScrollAmount()

getScrollType

public int getScrollType()
Returns:
the type of scrolling that should take place in response to this event.
See Also:
MouseWheelEvent.getScrollType()

getUnitsToScroll

public int getUnitsToScroll()
Returns:
This is a convenience method to aid in the implementation of the common-case MouseWheelListener - to scroll a ScrollPane or JScrollPane by an amount which conforms to the platform settings.
See Also:
MouseWheelEvent.getUnitsToScroll()

getWheelRotation

public int getWheelRotation()
Returns:
the number of "clicks" the mouse wheel was rotated.
See Also:
MouseWheelEvent.getWheelRotation()

matches

public boolean matches(java.util.EventObject eventObject)
Tests if an event can trigger that transition.

Overrides:
matches in class CStateMachine.EventOnTag
Parameters:
eventObject - The event to test
Returns:
True if the eventObject can trigger this transition.