public class FocusTrigger extends Trigger implements FocusListener
FocusTrigger trigger = FocusTrigger.addTrigger (component, anim, FocusTriggerEvent.GAINED);
Constructor and Description |
---|
FocusTrigger(org.pushingpixels.trident.Timeline timeline,
FocusTriggerEvent event)
Creates a non-auto-reversing FocusTrigger, which should be added to a
Component that will generate the focus events of interest.
|
FocusTrigger(org.pushingpixels.trident.Timeline timeline,
FocusTriggerEvent event,
boolean autoReverse)
Creates a FocusTrigger, which should be added to a Component that will
generate the focus events of interest.
|
Modifier and Type | Method and Description |
---|---|
static FocusTrigger |
addTrigger(JComponent component,
org.pushingpixels.trident.Timeline timeline,
FocusTriggerEvent event)
Creates a non-auto-reversing FocusTrigger and adds it as a FocusListener
to the component.
|
static FocusTrigger |
addTrigger(JComponent component,
org.pushingpixels.trident.Timeline timeline,
FocusTriggerEvent event,
boolean autoReverse)
Creates a FocusTrigger and adds it as a FocusListener to the component.
|
void |
focusGained(FocusEvent e)
Called by the object which added this trigger as a FocusListener.
|
void |
focusLost(FocusEvent e)
Called by the object which added this trigger as a FocusListener.
|
disarm, fire, fire, isTimelineRunning
public FocusTrigger(org.pushingpixels.trident.Timeline timeline, FocusTriggerEvent event)
timeline
- the Timeline that will start when the event occursevent
- the FocusTriggerEvent that will cause the action to firepublic FocusTrigger(org.pushingpixels.trident.Timeline timeline, FocusTriggerEvent event, boolean autoReverse)
timeline
- the Timeline that will start when the event occursevent
- the FocusTriggerEvent that will cause the action to fireautoReverse
- flag to determine whether the timeline should stop and reverse
based on opposite triggerEvents.public static FocusTrigger addTrigger(JComponent component, org.pushingpixels.trident.Timeline timeline, FocusTriggerEvent event)
component
- component that will generate FocusEvents for this triggertimeline
- the Timeline that will start when the event occursevent
- the FocusTriggerEvent that will cause the action to firepublic static FocusTrigger addTrigger(JComponent component, org.pushingpixels.trident.Timeline timeline, FocusTriggerEvent event, boolean autoReverse)
component
- component that will generate FocusEvents for this triggertimeline
- the Timeline that will start when the event occursevent
- the FocusTriggerEvent that will cause the action to fireautoReverse
- flag to determine whether the timeline should stop and reverse
based on opposite triggerEvents.public void focusGained(FocusEvent e)
focusGained
in interface FocusListener
public void focusLost(FocusEvent e)
focusLost
in interface FocusListener