Class GhostingListener
- java.lang.Object
-
- org.pushingpixels.lafwidget.animation.effects.GhostingListener
-
public class GhostingListener extends Object
Listener for the "ghosting image" effects on buttons.
-
-
Field Summary
Fields Modifier and Type Field Description protected ButtonModel
buttonModel
The associated model.protected JComponent
comp
The associated component.protected ChangeListener
modelListener
Listener on the model changes.protected Map<AnimationFacet,Boolean>
prevStateMap
Key -AnimationFacet
, value -Boolean
-
Constructor Summary
Constructors Constructor Description GhostingListener(JComponent comp, ButtonModel buttonModel)
Creates a new listener on model changes that can cause ghost animation transitions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.pushingpixels.trident.Timeline
getGhostComponentPressedTimeline()
org.pushingpixels.trident.Timeline
getGhostIconRolloverTimeline()
static Map<JComponent,org.pushingpixels.trident.Timeline>
getRunningGhostPressTimelines()
static Map<JComponent,org.pushingpixels.trident.Timeline>
getRunningGhostRolloverTimelines()
void
registerListeners()
Registers listeners on the relevant model changes.protected void
trackModelChange(AnimationFacet animationFacet, boolean newState)
Tracks a single change to the model.void
unregisterListeners()
Unregisters all listeners on model changes.
-
-
-
Field Detail
-
modelListener
protected ChangeListener modelListener
Listener on the model changes.
-
comp
protected JComponent comp
The associated component.
-
buttonModel
protected ButtonModel buttonModel
The associated model.
-
prevStateMap
protected Map<AnimationFacet,Boolean> prevStateMap
Key -AnimationFacet
, value -Boolean
-
-
Constructor Detail
-
GhostingListener
public GhostingListener(JComponent comp, ButtonModel buttonModel)
Creates a new listener on model changes that can cause ghost animation transitions.- Parameters:
comp
- Component.buttonModel
- Model for the component.
-
-
Method Detail
-
trackModelChange
protected void trackModelChange(AnimationFacet animationFacet, boolean newState)
Tracks a single change to the model.- Parameters:
animationFacet
- Animation facet.newState
- New value of the relevant attribute of the model.
-
registerListeners
public void registerListeners()
Registers listeners on the relevant model changes.
-
unregisterListeners
public void unregisterListeners()
Unregisters all listeners on model changes.
-
getRunningGhostRolloverTimelines
public static Map<JComponent,org.pushingpixels.trident.Timeline> getRunningGhostRolloverTimelines()
-
getRunningGhostPressTimelines
public static Map<JComponent,org.pushingpixels.trident.Timeline> getRunningGhostPressTimelines()
-
getGhostComponentPressedTimeline
public org.pushingpixels.trident.Timeline getGhostComponentPressedTimeline()
-
getGhostIconRolloverTimeline
public org.pushingpixels.trident.Timeline getGhostIconRolloverTimeline()
-
-