Class TriggerEvent
java.lang.Object
org.jdesktop.animation.timing.triggers.TriggerEvent
- Direct Known Subclasses:
FocusTriggerEvent
,MouseTriggerEvent
,TimingTriggerEvent
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
ConstructorsModifierConstructorDescriptionprotected
TriggerEvent
(String name) Protected constructor; this helps ensure type-safe use of pre-define TriggerEvent objects. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the 'opposite' event from itself.
-
Constructor Details
-
TriggerEvent
Protected constructor; this helps ensure type-safe use of pre-define TriggerEvent objects.
-
-
Method Details
-
getOppositeEvent
This method returns the 'opposite' event from itself. This is used byTrigger
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.
-