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