TimelineScenario.TimelineScenarioActorSwingComponentTimeline, SwingRepaintTimelinepublic class Timeline extends java.lang.Object implements TimelineScenario.TimelineScenarioActor
builder() or builder(Object)
and methods on the Timeline.BaseBuilder to configure one or more properties to
be interpolated over a period of time. In the simplest case, a timeline operates on
a single object passed to builder(Object), and one or more properties that have
matching public setters. In that case, use the
Timeline.BaseBuilder.addPropertyToInterpolate(String, Object, Object) API to configure
which properties should be interpolated.
In a more complex case, use
Timeline.BaseBuilder.addPropertyToInterpolate(TimelinePropertyBuilder) together with
property(String) and TimelinePropertyBuilder.on(Object) to interpolate
properties of multiple objects.
TimelinePropertyBuilder.setWith(TimelinePropertyBuilder.PropertySetter),
TimelinePropertyBuilder.getWith(TimelinePropertyBuilder.PropertyGetter) and
TimelinePropertyBuilder.accessWith(TimelinePropertyBuilder.PropertyAccessor)
can be used to work with properties that are not exposed via public setters or getters.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Timeline.BaseBuilder<T extends Timeline,B extends Timeline.BaseBuilder<?,?,?>,M> |
|
static class |
Timeline.Builder |
|
static class |
Timeline.RepeatBehavior |
|
static class |
Timeline.TimelineState |
| Modifier and Type | Field | Description |
|---|---|---|
static long |
DEFAULT_DURATION |
|
static TimelineEase |
DEFAULT_EASE |
| Modifier | Constructor | Description |
|---|---|---|
protected |
Timeline(java.lang.Object mainTimelineObject) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
abort() |
Aborts this timeline.
|
protected void |
addCallback(TimelineCallback callback) |
|
static Timeline.Builder |
builder() |
|
static Timeline.Builder |
builder(java.lang.Object mainTimelineObject) |
|
void |
cancel() |
Cancels this timeline.
|
void |
cancelAtCycleBreak() |
Requests that the specified timeline should stop at the end of the cycle.
|
void |
end() |
Ends this timeline.
|
long |
getCycleDelay() |
|
long |
getDuration() |
|
float |
getDurationFraction() |
|
TimelineEase |
getEase() |
|
protected static long |
getId() |
Returns a unique ID.
|
long |
getInitialDelay() |
|
java.lang.Object |
getMainObject() |
|
java.lang.String |
getName() |
|
Timeline.RepeatBehavior |
getRepeatBehavior() |
|
java.lang.Comparable<?> |
getSecondaryId() |
|
Timeline.TimelineState |
getState() |
|
float |
getTimelinePosition() |
|
boolean |
isDone() |
|
void |
play() |
|
void |
playLoop(int loopCount,
Timeline.RepeatBehavior repeatBehavior) |
|
void |
playLoop(Timeline.RepeatBehavior repeatBehavior) |
|
void |
playLoopSkipping(int loopCount,
Timeline.RepeatBehavior repeatBehavior,
long msToSkip) |
|
void |
playLoopSkipping(Timeline.RepeatBehavior repeatBehavior,
long msToSkip) |
|
void |
playReverse() |
|
void |
playReverseSkipping(long msToSkip) |
|
void |
playSkipping(long msToSkip) |
|
static <T> TimelinePropertyBuilder<T> |
property(java.lang.String propertyName) |
|
void |
replay() |
|
void |
replayReverse() |
|
void |
resetDoneFlag() |
|
void |
resume() |
|
protected boolean |
shouldForceUiUpdate() |
|
boolean |
supportsReplay() |
|
void |
suspend() |
|
java.lang.String |
toString() |
public static final long DEFAULT_DURATION
public static final TimelineEase DEFAULT_EASE
public static Timeline.Builder builder()
public static Timeline.Builder builder(java.lang.Object mainTimelineObject)
protected final void addCallback(TimelineCallback callback)
public static <T> TimelinePropertyBuilder<T> property(java.lang.String propertyName)
protected boolean shouldForceUiUpdate()
public void play()
play in interface TimelineScenario.TimelineScenarioActorpublic void playSkipping(long msToSkip)
public void playReverse()
public void playReverseSkipping(long msToSkip)
public void replay()
public void replayReverse()
public void playLoop(Timeline.RepeatBehavior repeatBehavior)
public void playLoopSkipping(Timeline.RepeatBehavior repeatBehavior, long msToSkip)
public void playLoop(int loopCount,
Timeline.RepeatBehavior repeatBehavior)
public void playLoopSkipping(int loopCount,
Timeline.RepeatBehavior repeatBehavior,
long msToSkip)
public void cancel()
Timeline.TimelineState.CANCELLED state,
preserving its current timeline position. After application callbacks and field
interpolations are done on the Timeline.TimelineState.CANCELLED state, the timeline
transitions to the Timeline.TimelineState.IDLE state. Application callbacks and field
interpolations are done on this state as well.public void end()
Timeline.TimelineState.DONE state, with
the timeline position set to 0.0 or 1.0 - based on the direction of the timeline. After
application callbacks and field interpolations are done on the Timeline.TimelineState.DONE
state, the timeline transitions to the Timeline.TimelineState.IDLE state. Application
callbacks and field interpolations are done on this state as well.public void abort()
Timeline.TimelineState.IDLE state. No
application callbacks or field interpolations are done.public void suspend()
public void resume()
public void cancelAtCycleBreak()
protected static long getId()
public final float getTimelinePosition()
public final float getDurationFraction()
public final Timeline.TimelineState getState()
public boolean isDone()
isDone in interface TimelineScenario.TimelineScenarioActorpublic boolean supportsReplay()
supportsReplay in interface TimelineScenario.TimelineScenarioActorpublic void resetDoneFlag()
resetDoneFlag in interface TimelineScenario.TimelineScenarioActorpublic java.lang.String toString()
toString in class java.lang.Objectpublic final long getDuration()
public long getInitialDelay()
public long getCycleDelay()
public Timeline.RepeatBehavior getRepeatBehavior()
public java.lang.String getName()
public TimelineEase getEase()
public java.lang.Object getMainObject()
public java.lang.Comparable<?> getSecondaryId()