net.nexttext.behaviour.control
Class OnMouseOver
java.lang.Object
net.nexttext.behaviour.AbstractAction
net.nexttext.behaviour.control.Condition
net.nexttext.behaviour.control.OnMouseOver
- All Implemented Interfaces:
- Action
- Direct Known Subclasses:
- OnMouseIn, OnMouseOut
public class OnMouseOver
- extends Condition
A Condition which is true when the mouse is on top of the TextObject and
false when it is not.
Constructor Summary |
OnMouseOver(Action trueAction)
Creates an OnMouseOver which performs the given Action when the mouse
is over the TextObject. |
OnMouseOver(Action trueAction,
Action falseAction)
Creates an OnMouseOver which performs one of the given Actions, depending
on whether or not the mouse is over the TextObject. |
Method Summary |
boolean |
condition(TextObject to)
Checks whether or not the mouse is over the given TextObject. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OnMouseOver
public OnMouseOver(Action trueAction)
- Creates an OnMouseOver which performs the given Action when the mouse
is over the TextObject.
- Parameters:
trueAction
- the Action to perform when the mouse is over the TextObject
OnMouseOver
public OnMouseOver(Action trueAction,
Action falseAction)
- Creates an OnMouseOver which performs one of the given Actions, depending
on whether or not the mouse is over the TextObject.
- Parameters:
trueAction
- the Action to perform when the mouse is over the TextObjectfalseAction
- the Action to perform when the mouse is off the TextObject
condition
public boolean condition(TextObject to)
- Checks whether or not the mouse is over the given TextObject.
- Specified by:
condition
in class Condition
- Parameters:
to
- the TextObject to consider
- Returns:
- the outcome of the condition