net.nexttext.behaviour.control
Class OnMouseReleased

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.control.Condition
          extended by net.nexttext.behaviour.control.OnMouseDepressed
              extended by net.nexttext.behaviour.control.OnMouseReleased
All Implemented Interfaces:
Action
Direct Known Subclasses:
OnMouseReleasedOver

public class OnMouseReleased
extends OnMouseDepressed

A Condition which is true when a mouse button is released i.e. a single true result is returned if the button was down and got released.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
OnMouseReleased(Action trueAction)
          Creates an OnMouseReleased which performs the given Action when the mouse button 1 is released.
OnMouseReleased(int buttonToCheck, Action trueAction)
          Creates an OnMouseReleased which performs the given Action when the selected mouse button is released.
 
Method Summary
 boolean condition(TextObject to)
          Checks whether or not the selected mouse button is released.
 
Methods inherited from class net.nexttext.behaviour.control.Condition
behave, complete, getRequiredProperties
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, getDisplayName, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnMouseReleased

public OnMouseReleased(Action trueAction)
Creates an OnMouseReleased which performs the given Action when the mouse button 1 is released.

Parameters:
trueAction - the Action to perform when the mouse button 1 is released

OnMouseReleased

public OnMouseReleased(int buttonToCheck,
                       Action trueAction)
Creates an OnMouseReleased which performs the given Action when the selected mouse button is released.

Parameters:
buttonToCheck - the mouse button to consider
trueAction - the Action to perform when the selected mouse button is released
Method Detail

condition

public boolean condition(TextObject to)
Checks whether or not the selected mouse button is released.

Overrides:
condition in class OnMouseDepressed
Parameters:
to - the TextObject to consider (unused)
Returns:
the outcome of the condition