public class TriggerEvent extends Object
Trigger
to treat event types generically, rather than to have
all even logic in the subclasses of Trigger.Modifier | Constructor and Description |
---|---|
protected |
TriggerEvent(String name)
Protected constructor; this helps ensure type-safe use of
pre-define TriggerEvent objects.
|
Modifier and Type | Method and Description |
---|---|
TriggerEvent |
getOppositeEvent()
This method returns the 'opposite' event from itself.
|
protected TriggerEvent(String name)
public TriggerEvent getOppositeEvent()
Trigger
in running an auto-reversing animation, to determine
whether an opposite event has occurred (and whether to stop/reverse
the animation). Note that some events may have no opposite.
Default behavior returns same event; subclasses with multiple/opposite
events must override to do the right thing here.