|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.lafwidget.animation.FadeStateListener
public class FadeStateListener
Implements listener on model changes of some component. Once model changes
(select, arm, focus, ...), the listener notifies the FadeTracker
.
Field Summary | |
---|---|
protected javax.swing.ButtonModel |
buttonModel
The associated model. |
protected FadeTrackerCallback |
callback
Optional application callback. |
protected java.awt.Component |
comp
The associated component. |
protected java.lang.Comparable<?> |
extraKey
|
protected java.awt.event.FocusListener |
focusListener
Listener on the focus gain and loss. |
protected long |
focusLoopFadeInstanceId
Instance ID of focus loop animation. |
protected javax.swing.event.ChangeListener |
modelListener
Listener on the model changes. |
protected java.util.Map<FadeKind,java.lang.Boolean> |
prevStateMap
Key - FadeKind , value - Boolean |
protected java.util.Set<FadeKind> |
toIgnore
A set of fade kinds to ignore. |
Constructor Summary | |
---|---|
FadeStateListener(java.awt.Component comp,
javax.swing.ButtonModel buttonModel,
FadeTrackerCallback callback)
Creates a new listener on model changes that can cause fade animation transitions. |
|
FadeStateListener(java.awt.Component comp,
java.lang.Comparable<?> extraKey,
javax.swing.ButtonModel buttonModel,
FadeTrackerCallback callback,
java.util.Set<FadeKind> toIgnore)
Creates a new listener on model changes that can cause fade animation transitions. |
Method Summary | |
---|---|
protected void |
initiateFocusFadeLoop()
Initiates the looping animation on focus ring. |
void |
registerListeners()
Registers listeners on all model changes. |
void |
registerListeners(boolean toRepaintParent)
Registers listeners on all model changes. |
protected void |
trackModelChange(FadeKind fadeKind,
boolean newValue,
boolean toRepaintParent)
Tracks a single change to the model. |
void |
unregisterListeners()
Unregisters all listeners on model changes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FadeTrackerCallback callback
protected java.awt.Component comp
protected javax.swing.ButtonModel buttonModel
protected java.lang.Comparable<?> extraKey
protected java.util.Map<FadeKind,java.lang.Boolean> prevStateMap
FadeKind
, value - Boolean
protected javax.swing.event.ChangeListener modelListener
protected java.awt.event.FocusListener focusListener
protected long focusLoopFadeInstanceId
protected java.util.Set<FadeKind> toIgnore
Constructor Detail |
---|
public FadeStateListener(java.awt.Component comp, javax.swing.ButtonModel buttonModel, FadeTrackerCallback callback)
comp
- Component.buttonModel
- Model for the component.callback
- Optional application callback.public FadeStateListener(java.awt.Component comp, java.lang.Comparable<?> extraKey, javax.swing.ButtonModel buttonModel, FadeTrackerCallback callback, java.util.Set<FadeKind> toIgnore)
comp
- Component.buttonModel
- Model for the component.callback
- Optional application callback.toIgnore
- Set of fade kinds to ignore.Method Detail |
---|
protected void trackModelChange(FadeKind fadeKind, boolean newValue, boolean toRepaintParent)
fadeKind
- Fade animation kind.newValue
- New value of the relevant attribute of the model.toRepaintParent
- If true
, the component parent will be repainted
at every animation cycle. If false
, the component
itself will be repainted at every animation cycle.public void registerListeners()
public void registerListeners(boolean toRepaintParent)
toRepaintParent
- If true
, the component parent will be repainted
at every animation cycle. If false
, the component
itself will be repainted at every animation cycle.protected void initiateFocusFadeLoop()
public void unregisterListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |