org.jvnet.lafwidget.animation
public class FadeState extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static long |
counter
Is used to create unique value for the
id field. |
FadeKind |
fadeKind
Fade animation kind.
|
FadeStep |
fadeStep
Fade animation step.
|
protected long |
id
Unique ID.
|
Constructor and Description |
---|
FadeState(FadeKind fadeKind,
float fadePosition,
boolean isFadingIn,
boolean toRepaintParent)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
FadeTrackerCallback |
getCallback()
Returns the application callback.
|
FadeState |
getCopy()
Returns a copy.
|
float |
getFadePosition()
Returns the current fade position.
|
protected static long |
getId()
Returns a unique ID.
|
int |
getLoopCount() |
boolean |
isFadingIn()
Returns the fade-in / fade-out indication.
|
boolean |
isLooping()
Returns the looping indication.
|
boolean |
isLoopingReverse()
Returns indication whether the looping fade starts fading out after
reaching the maximum value.
|
boolean |
isToRepaintParent()
Returns indication whether the component parent should be repainted on
each fade cycle.
|
boolean |
isToStopAtCycleBreak()
Returns indication whether the looping fade should stop at reaching the
end of the fade-out cycle.
|
void |
setCallback(FadeTrackerCallback callback)
Sets the callback.
|
void |
setFadePosition(float fadePosition)
Sets the current fade position.
|
void |
setFadingIn(boolean isFadingIn)
Sets fade-in / fade-out indication.
|
void |
setLoopCount(int loopCount) |
void |
setLooping(boolean isLooping)
Sets the looping indication.
|
void |
setLoopingReverse(boolean isLoopingReverse)
Sets indication whether the looping fade starts fading out after reaching
the maximum value.
|
void |
setToRepaintParent(boolean toRepaintParent)
Sets indication whether the component parent should be repainted on each
fade cycle.
|
void |
setToStopAtCycleBreak(boolean toStopAtCycleBreak)
Sets indication whether the looping fade should stop at reaching the end
of the fade-out cycle.
|
void |
toStopAtCycleBreak()
Sets indication that looping fade should stop at the end of the fade-out
cycle.
|
protected static long counter
id
field.protected long id
public FadeStep fadeStep
public FadeKind fadeKind
public FadeState(FadeKind fadeKind, float fadePosition, boolean isFadingIn, boolean toRepaintParent)
fadeKind
- Fade animation kind.fadePosition
- Fade cycle.isFadingIn
- Indication whether it's a fade-in or fade-out.toRepaintParent
- Indication whether the component parent should be repainted on
each fade cycle.public FadeState getCopy()
public void toStopAtCycleBreak()
protected static long getId()
public void setCallback(FadeTrackerCallback callback)
callback
- Callback.public FadeTrackerCallback getCallback()
null
.null
application callback.public void setFadePosition(float fadePosition)
fadePosition
- New fade position.public float getFadePosition()
public void setFadingIn(boolean isFadingIn)
isFadingIn
- true
if the current animation is fade-in,
false
if the current animation is fade-out.public boolean isFadingIn()
true
if the current animation is fade-in,
false
if the current animation is fade-out.public void setLooping(boolean isLooping)
isLooping
- New value for the looping indication.public boolean isLooping()
true
if the animation is looping,
false
otherwise.public void setLoopingReverse(boolean isLoopingReverse)
isLoopingReverse
- true
if the looping animation should start
fading out after reaching the maximum value,
false
otherwise.public boolean isLoopingReverse()
true
if the looping animation should start fading
out after reaching the maximum value, false
otherwise.public void setToStopAtCycleBreak(boolean toStopAtCycleBreak)
toStopAtCycleBreak
- true
if the looping indication should stop at
the next fade-out cycle end, false
otherwise.public boolean isToStopAtCycleBreak()
true
if the looping indication should stop at the
next fade-out cycle end, false
otherwise.public void setToRepaintParent(boolean toRepaintParent)
toRepaintParent
- true
if the component parent should be
repainted on each fade cycle, false
otherwise.public boolean isToRepaintParent()
true
if the component parent should be repainted
on each fade cycle, false
otherwise.public int getLoopCount()
public void setLoopCount(int loopCount)