org.jdesktop.animation.timing.triggers
Class TriggerEvent
java.lang.Object
org.jdesktop.animation.timing.triggers.TriggerEvent
- Direct Known Subclasses:
- FocusTriggerEvent, MouseTriggerEvent, TimingTriggerEvent
public class TriggerEvent
- extends Object
Superclass for all TriggerEvents used in the Trigger classes. The methods
here are mostly protected; it is expected that callers will not use this
class directly, but will instead use subclasses with pre-defined event
types. The purpose of this superclass is to provide the ability for
Trigger
to treat event types generically, rather than to have
all even logic in the subclasses of Trigger.
Constructor Summary |
protected |
TriggerEvent(String name)
Protected constructor; this helps ensure type-safe use of
pre-define TriggerEvent objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TriggerEvent
protected TriggerEvent(String name)
- Protected constructor; this helps ensure type-safe use of
pre-define TriggerEvent objects.
getOppositeEvent
public TriggerEvent getOppositeEvent()
- This method returns the 'opposite' event from itself. This is used by
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.