java.lang.Object
org.pushingpixels.radiance.animation.api.Timeline
All Implemented Interfaces:
TimelineScenario.TimelineScenarioActor
Direct Known Subclasses:
SwingComponentTimeline, SwingRepaintTimeline

public class Timeline extends Object implements TimelineScenario.TimelineScenarioActor
The main entry point into Animation. Use 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.

  • Field Details

    • DEFAULT_DURATION

      public static final long DEFAULT_DURATION
      See Also:
    • DEFAULT_EASE

      public static final TimelineEase DEFAULT_EASE
    • mainObject

      private Object mainObject
    • secondaryId

      private Comparable<?> secondaryId
    • fullObjectID

    • duration

      private long duration
    • initialDelay

      private long initialDelay
    • cycleDelay

      private long cycleDelay
    • isLooping

      boolean isLooping
    • repeatCount

      int repeatCount
    • repeatBehavior

      private Timeline.RepeatBehavior repeatBehavior
    • mainObjectIsUiComponent

      private boolean mainObjectIsUiComponent
    • callbackChain

      Timeline.Chain callbackChain
    • name

      private String name
    • propertiesToInterpolate

      private List<TimelinePropertyBuilder.AbstractFieldInfo<?>> propertiesToInterpolate
    • counter

      private static long counter
      Is used to create unique value for the id field.
    • id

      long id
      Unique ID.
    • durationFraction

      float durationFraction
      Timeline position.
    • timelinePosition

      float timelinePosition
      Timeline position.
    • timeUntilPlay

      long timeUntilPlay
    • toCancelAtCycleBreak

      boolean toCancelAtCycleBreak
      Indication whether the looping timeline should stop at reaching the end of the cycle. Relevant only when isLooping is true.
    • stateStack

      private Stack<Timeline.TimelineState> stateStack
    • ease

      private TimelineEase ease
    • doneCount

      private int doneCount
  • Constructor Details

    • Timeline

      protected Timeline(Object mainTimelineObject)
  • Method Details