public class ActionTrigger extends Trigger implements ActionListener
ActionTrigger trigger = ActionTrigger.addTrigger (button, anim);
Constructor and Description |
---|
ActionTrigger(org.pushingpixels.trident.Timeline timeline)
Creates an ActionTrigger that will start the timeline upon receiving any
ActionEvents.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent ae)
Called by an object generating ActionEvents to which this trigger was
added as an ActionListener.
|
static ActionTrigger |
addTrigger(Object object,
org.pushingpixels.trident.Timeline timeline)
Creates an ActionTrigger and adds it as a listener to object.
|
disarm, fire, fire, isTimelineRunning
public ActionTrigger(org.pushingpixels.trident.Timeline timeline)
timeline
- the Timeline that will start when the event occurspublic static ActionTrigger addTrigger(Object object, org.pushingpixels.trident.Timeline timeline)
object
- an object that will be used as an event source for this
trigger. This object must have the method addActionListener.timeline
- the Timeline that will start when the event occursIllegalArgumentException
- if object has no addActionListener()
public void actionPerformed(ActionEvent ae)
actionPerformed
in interface ActionListener