|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.lafwidget.animation.FadeTracker
public class FadeTracker
Tracker class for fade animations.
Nested Class Summary | |
---|---|
protected static class |
FadeTracker.ComponentId
Information on a single component under fade. |
Field Summary | |
---|---|
static boolean |
DEBUG_MODE
Debug mode indicator. |
static int |
END_VALUE
Max value for fade cycle. |
Method Summary | |
---|---|
void |
cancelFadeInstance(long fadeInstanceId)
Cancels the specified fade instance. |
java.util.Set<java.awt.Component> |
getAllComponentsByFadeKind(FadeKind fadeKind)
Returns all components that are currently under the specified fade kind. |
long |
getCurrLoopId()
Returns the ID of the current loop iteration. |
float |
getFade10(java.awt.Component comp,
java.lang.Comparable<?> componentId,
FadeKind fadeKind)
Returns the fade cycle for the specified component. |
float |
getFade10(java.awt.Component comp,
FadeKind fadeKind)
Returns the fade cycle for the specified component. |
float |
getFade10(java.awt.Component comp,
int componentId,
FadeKind fadeKind)
Returns the fade cycle for the specified component. |
FadeState |
getFadeState(java.awt.Component comp,
java.lang.Comparable<?> componentId,
FadeKind fadeKind)
Returns the fade state of specified component if it's being tracked by this tracker or null . |
FadeState |
getFadeState(java.awt.Component comp,
FadeKind fadeKind)
Returns the fade state of specified component if it's being tracked by this tracker or null . |
FadeState |
getFadeState(java.awt.Component comp,
int componentId,
FadeKind fadeKind)
Returns the fade state of specified component if it's being tracked by this tracker or null . |
static FadeTracker |
getInstance()
Gets singleton instance. |
boolean |
isTracked(java.awt.Component comp,
java.lang.Comparable<?> componentId,
FadeKind fadeKind)
Checks whether the specified component is being tracked by this tracker. |
boolean |
isTracked(java.awt.Component comp,
java.lang.Comparable<?> componentId,
FadeKind fadeKind,
boolean checkFadeIn)
Checks whether the specified component is being tracked by this tracker. |
boolean |
isTracked(java.awt.Component comp,
FadeKind fadeKind)
Checks whether the specified component is being tracked by this tracker. |
boolean |
isTracked(java.awt.Component comp,
int componentId,
FadeKind fadeKind)
Checks whether the specified component is being tracked by this tracker. |
void |
requestStopOnCycleBreak(long fadeInstanceId)
Requests that the specified fade instance should stop at the end of the fade-out. |
void |
stopAllTimers()
Stops tracking of all components. |
long |
trackFade(java.awt.Component comp,
FadeKind fadeKind,
boolean isFadeIn,
boolean toRepaintParent)
Requests start of fade tracking on the specified component. |
long |
trackFade(java.awt.Component comp,
FadeKind fadeKind,
boolean isFadeIn,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade tracking on the specified component. |
long |
trackFadeIn(FadeKind fadeKind,
java.awt.Component comp,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade-in tracking on the specified component. |
long |
trackFadeIn(FadeKind fadeKind,
java.awt.Component comp,
java.lang.Comparable<?> componentId,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade-in tracking on the specified component. |
long |
trackFadeIn(FadeKind fadeKind,
java.awt.Component comp,
java.lang.Comparable<?> componentId,
boolean toRepaintParent,
FadeTrackerCallback callback,
LafConstants.AnimationKind aKind)
Requests start of fade-in tracking on the specified component. |
long |
trackFadeIn(FadeKind fadeKind,
java.awt.Component comp,
int componentId,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade-in tracking on the specified component. |
long |
trackFadeLooping(FadeKind fadeKind,
LafConstants.AnimationKind animationKind,
java.awt.Component comp,
java.lang.Comparable<?> componentId,
boolean toRepaintParent,
FadeTrackerCallback callback,
int loopCount,
boolean isLoopingReverse)
Requests start of looping fade tracking on the specified component. |
long |
trackFadeOut(FadeKind fadeKind,
java.awt.Component comp,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade-out tracking on the specified component. |
long |
trackFadeOut(FadeKind fadeKind,
java.awt.Component comp,
java.lang.Comparable<?> componentId,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade-out tracking on the specified component. |
long |
trackFadeOut(FadeKind fadeKind,
java.awt.Component comp,
java.lang.Comparable<?> componentId,
boolean toRepaintParent,
FadeTrackerCallback callback,
LafConstants.AnimationKind aKind)
Requests start of fade-out tracking on the specified component. |
long |
trackFadeOut(FadeKind fadeKind,
java.awt.Component comp,
int componentId,
boolean toRepaintParent,
FadeTrackerCallback callback)
Requests start of fade-out tracking on the specified component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int END_VALUE
public static boolean DEBUG_MODE
true
to have trace messages
on console.
Method Detail |
---|
public static FadeTracker getInstance()
public long trackFadeIn(FadeKind fadeKind, java.awt.Component comp, boolean toRepaintParent, FadeTrackerCallback callback)
fadeKind
- Fade kind.comp
- The component to track.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeIn(FadeKind fadeKind, java.awt.Component comp, int componentId, boolean toRepaintParent, FadeTrackerCallback callback)
fadeKind
- Fade kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes
(where fade is performed on component "sub" parts).toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeIn(FadeKind fadeKind, java.awt.Component comp, java.lang.Comparable<?> componentId, boolean toRepaintParent, FadeTrackerCallback callback)
fadeKind
- Fade kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeIn(FadeKind fadeKind, java.awt.Component comp, java.lang.Comparable<?> componentId, boolean toRepaintParent, FadeTrackerCallback callback, LafConstants.AnimationKind aKind)
fadeKind
- Fade kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.aKind
- Animation kind. Should not be null
.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeOut(FadeKind fadeKind, java.awt.Component comp, boolean toRepaintParent, FadeTrackerCallback callback)
fadeKind
- Fade kind.comp
- The component to track.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeOut(FadeKind fadeKind, java.awt.Component comp, int componentId, boolean toRepaintParent, FadeTrackerCallback callback)
fadeKind
- Fade kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes
(where fade is performed on component "sub" parts).toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeOut(FadeKind fadeKind, java.awt.Component comp, java.lang.Comparable<?> componentId, boolean toRepaintParent, FadeTrackerCallback callback)
fadeKind
- Fade kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeOut(FadeKind fadeKind, java.awt.Component comp, java.lang.Comparable<?> componentId, boolean toRepaintParent, FadeTrackerCallback callback, LafConstants.AnimationKind aKind)
fadeKind
- Fade kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.aKind
- Animation kind. Should not be null
.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFade(java.awt.Component comp, FadeKind fadeKind, boolean isFadeIn, boolean toRepaintParent)
comp
- The component to track.fadeKind
- Fade kind.isFadeIn
- Indication whether fade-in or fade-out should be commenced.toRepaintParent
- Indication whether the component parent should be repainted.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFade(java.awt.Component comp, FadeKind fadeKind, boolean isFadeIn, boolean toRepaintParent, FadeTrackerCallback callback)
comp
- The component to track.fadeKind
- Fade kind.isFadeIn
- Indication whether fade-in or fade-out should be commenced.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public long trackFadeLooping(FadeKind fadeKind, LafConstants.AnimationKind animationKind, java.awt.Component comp, java.lang.Comparable<?> componentId, boolean toRepaintParent, FadeTrackerCallback callback, int loopCount, boolean isLoopingReverse)
fadeKind
- Fade kind.animationKind
- Animation kind.comp
- The component to track.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.toRepaintParent
- Indication whether the component parent should be repainted.callback
- Optional callback to be called on each fade cycle.loopCount
- Loop count.isLoopingReverse
- If true
, when the fade value gets to the
maximal value, the fade cycle will begin fade-out. Otherwise
the fade cycle will begin from 0, continuing to fade-in.
-1
signifies that there was no fade instance
created (this may happen when the specified component is not
visible).public boolean isTracked(java.awt.Component comp, FadeKind fadeKind)
this
tracker. Effectively returns indication whether the
specified component is in fade-in or fade-out animation of the specified
kind.
comp
- Component.fadeKind
- Fade kind.
true
if the specified component is being tracked
by this
tracker, false
otherwise.public boolean isTracked(java.awt.Component comp, int componentId, FadeKind fadeKind)
this
tracker. Effectively returns indication whether the
specified component is in fade-in or fade-out animation of the specified
kind.
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes
(where fade is performed on component "sub" parts).fadeKind
- Fade kind.
true
if the specified component is being tracked
by this
tracker, false
otherwise.public boolean isTracked(java.awt.Component comp, java.lang.Comparable<?> componentId, FadeKind fadeKind)
this
tracker. Effectively returns indication whether the
specified component is in fade-in or fade-out animation of the specified
kind.
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.fadeKind
- Fade kind.
true
if the specified component is being tracked
by this
tracker, false
otherwise.public boolean isTracked(java.awt.Component comp, java.lang.Comparable<?> componentId, FadeKind fadeKind, boolean checkFadeIn)
this
tracker. Effectively returns indication whether the
specified component is in the specified animation (fade-in / fade-out) of
the specified kind.
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.fadeKind
- Fade kind. May be null
- not recommended.checkFadeIn
- Specifies whether the check should be done for fade-in state.
If true
, the returned value will be
true
only if the component is tracked and
it is in the fade-in state.
true
if the specified component is being tracked
by this
tracker, false
otherwise.public float getFade10(java.awt.Component comp, FadeKind fadeKind)
comp
- Component.fadeKind
- Fade kind.
#isTracked(Component, org.jvnet.lafwidget.animation.FadeTracker.FadeKind)
returns false
), value 0 (zero) is returned.public float getFade10(java.awt.Component comp, int componentId, FadeKind fadeKind)
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes
(where fade is performed on component "sub" parts).fadeKind
- Fade kind.
#isTracked(Component, org.jvnet.lafwidget.animation.FadeTracker.FadeKind)
returns false
), value 0 (zero) is returned.public float getFade10(java.awt.Component comp, java.lang.Comparable<?> componentId, FadeKind fadeKind)
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.fadeKind
- Fade kind.
#isTracked(Component, org.jvnet.lafwidget.animation.FadeTracker.FadeKind)
returns false
), value 0 (zero) is returned.public FadeState getFadeState(java.awt.Component comp, FadeKind fadeKind)
this
tracker or null
.
comp
- Component.fadeKind
- Fade kind.
this
tracker or null
.public FadeState getFadeState(java.awt.Component comp, int componentId, FadeKind fadeKind)
this
tracker or null
.
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes
(where fade is performed on component "sub" parts).fadeKind
- Fade kind.
this
tracker or null
.public FadeState getFadeState(java.awt.Component comp, java.lang.Comparable<?> componentId, FadeKind fadeKind)
this
tracker or null
.
comp
- Component.componentId
- Component id. Relevant for such components as tabbed panes,
lists, tables, trees and others (where fade is performed on
component "sub" parts). May be null
.fadeKind
- Fade kind.
this
tracker or null
.public void stopAllTimers()
trackerThread
).
public void cancelFadeInstance(long fadeInstanceId)
fadeInstanceId
- Fade instance ID.public void requestStopOnCycleBreak(long fadeInstanceId)
fadeInstanceId
- Fade instance ID.public java.util.Set<java.awt.Component> getAllComponentsByFadeKind(FadeKind fadeKind)
fadeKind
- Fade kind.
null
set of all components that are currently
under the specified fade kind.public long getCurrLoopId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |