public class IconGlowListener
extends java.lang.Object
FadeKind.ICON_GLOW
Modifier and Type | Field and Description |
---|---|
protected javax.swing.ButtonModel |
buttonModel
The associated model.
|
protected java.awt.Component |
comp
The associated component.
|
protected long |
glowLoopAnimationId
Animation ID of the glow icon loop.
|
protected javax.swing.event.ChangeListener |
modelListener
Listener on the model changes.
|
protected java.util.Map<FadeKind,java.lang.Boolean> |
prevStateMap
Key -
FadeKind , value - Boolean |
Constructor and Description |
---|
IconGlowListener(java.awt.Component comp,
javax.swing.ButtonModel buttonModel)
Creates a new listener on model changes that can cause fade animation
transitions.
|
Modifier and Type | Method and Description |
---|---|
void |
registerListeners()
Registers listeners on the relevant model changes.
|
protected void |
trackModelChange(FadeKind fadeKind,
boolean newState)
Tracks a single change to the model.
|
void |
unregisterListeners()
Unregisters all listeners on model changes.
|
protected javax.swing.event.ChangeListener modelListener
protected java.awt.Component comp
protected long glowLoopAnimationId
protected javax.swing.ButtonModel buttonModel
public IconGlowListener(java.awt.Component comp, javax.swing.ButtonModel buttonModel)
comp
- Component.buttonModel
- Model for the component.callback
- Optional application callback.protected void trackModelChange(FadeKind fadeKind, boolean newState)
fadeKind
- Fade animation kind.newState
- New value of the relevant attribute of the model.public void registerListeners()
public void unregisterListeners()