Class GhostingListener
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.widget.animation.effects.GhostingListener
-
public class GhostingListener extends java.lang.ObjectListener for the "ghosting image" effects on buttons.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.ButtonModelbuttonModelThe associated model.private javax.swing.JComponentcompThe associated component.(package private) static java.lang.StringGHOST_LISTENER_KEYprivate TimelineghostComponentPressedTimelineprivate TimelineghostIconRolloverTimelineprivate javax.swing.event.ChangeListenermodelListenerListener on the model changes.private java.util.Map<RadianceThemingSlices.AnimationFacet,java.lang.Boolean>prevStateMapprivate static java.util.Map<javax.swing.JComponent,Timeline>runningGhostPressTimelinesprivate static java.util.Map<javax.swing.JComponent,Timeline>runningGhostRolloverTimelines
-
Constructor Summary
Constructors Constructor Description GhostingListener(javax.swing.JComponent comp, javax.swing.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 TimelinegetGhostComponentPressedTimeline()TimelinegetGhostIconRolloverTimeline()static java.util.Map<javax.swing.JComponent,Timeline>getRunningGhostPressTimelines()static java.util.Map<javax.swing.JComponent,Timeline>getRunningGhostRolloverTimelines()voidregisterListeners()Registers listeners on the relevant model changes.private voidtrackModelChange(RadianceThemingSlices.AnimationFacet animationFacet, boolean newState)Tracks a single change to the model.voidunregisterListeners()Unregisters all listeners on model changes.
-
-
-
Field Detail
-
modelListener
private javax.swing.event.ChangeListener modelListener
Listener on the model changes.
-
comp
private javax.swing.JComponent comp
The associated component.
-
buttonModel
private javax.swing.ButtonModel buttonModel
The associated model.
-
GHOST_LISTENER_KEY
static final java.lang.String GHOST_LISTENER_KEY
- See Also:
- Constant Field Values
-
prevStateMap
private java.util.Map<RadianceThemingSlices.AnimationFacet,java.lang.Boolean> prevStateMap
-
ghostIconRolloverTimeline
private Timeline ghostIconRolloverTimeline
-
ghostComponentPressedTimeline
private Timeline ghostComponentPressedTimeline
-
runningGhostRolloverTimelines
private static java.util.Map<javax.swing.JComponent,Timeline> runningGhostRolloverTimelines
-
runningGhostPressTimelines
private static java.util.Map<javax.swing.JComponent,Timeline> runningGhostPressTimelines
-
-
Method Detail
-
trackModelChange
private void trackModelChange(RadianceThemingSlices.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 java.util.Map<javax.swing.JComponent,Timeline> getRunningGhostRolloverTimelines()
-
getRunningGhostPressTimelines
public static java.util.Map<javax.swing.JComponent,Timeline> getRunningGhostPressTimelines()
-
getGhostComponentPressedTimeline
public Timeline getGhostComponentPressedTimeline()
-
getGhostIconRolloverTimeline
public Timeline getGhostIconRolloverTimeline()
-
-