public class MouseTrigger extends Trigger implements MouseListener
MouseTrigger trigger = MouseTrigger.addTrigger (component, anim, MouseTriggerEvent.ENTER);
Constructor and Description |
---|
MouseTrigger(org.pushingpixels.trident.Timeline timeline,
MouseTriggerEvent event)
Creates a non-auto-reversing MouseTrigger, which should be added to a
Component that will generate the mouse events of interest
|
MouseTrigger(org.pushingpixels.trident.Timeline timeline,
MouseTriggerEvent event,
boolean autoReverse)
Creates a MouseTrigger, which should be added to a Component that will
generate the mouse events of interest
|
Modifier and Type | Method and Description |
---|---|
static MouseTrigger |
addTrigger(JComponent component,
org.pushingpixels.trident.Timeline timeline,
MouseTriggerEvent event)
Creates a non-auto-reversing MouseTrigger and adds it as a listener to
component.
|
static MouseTrigger |
addTrigger(JComponent component,
org.pushingpixels.trident.Timeline timeline,
MouseTriggerEvent event,
boolean autoReverse)
Creates a MouseTrigger and adds it as a listener to component.
|
void |
mouseClicked(MouseEvent e)
Called by the object which added this trigger as a MouseListener.
|
void |
mouseEntered(MouseEvent e)
Called by the object which added this trigger as a MouseListener.
|
void |
mouseExited(MouseEvent e)
Called by the object which added this trigger as a MouseListener.
|
void |
mousePressed(MouseEvent e)
Called by the object which added this trigger as a MouseListener.
|
void |
mouseReleased(MouseEvent e)
Called by the object which added this trigger as a MouseListener.
|
disarm, fire, fire, isTimelineRunning
public MouseTrigger(org.pushingpixels.trident.Timeline timeline, MouseTriggerEvent event)
public MouseTrigger(org.pushingpixels.trident.Timeline timeline, MouseTriggerEvent event, boolean autoReverse)
public static MouseTrigger addTrigger(JComponent component, org.pushingpixels.trident.Timeline timeline, MouseTriggerEvent event)
component
- component that will generate MouseEvents for this triggertimeline
- the Timeline that will start when the event occursevent
- the MouseTriggerEvent that will cause the action to firepublic static MouseTrigger addTrigger(JComponent component, org.pushingpixels.trident.Timeline timeline, MouseTriggerEvent event, boolean autoReverse)
component
- component that will generate MouseEvents for this triggertimeline
- the Tmeline that will start when the event occursevent
- the FocusTriggerEvent that will cause the action to fireautoReverse
- flag to determine whether the animator should stop and reverse
based on opposite triggerEvents.public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener