Class XYValueSeriesTransition

java.lang.Object
com.codename1.charts.transitions.SeriesTransition
com.codename1.charts.transitions.XYValueSeriesTransition
All Implemented Interfaces:
Animation

public class XYValueSeriesTransition extends SeriesTransition
A transition for enabling animations between different values in an XYSeries.
  • Field Summary

    Fields inherited from class SeriesTransition

    EASING_IN, EASING_IN_OUT, EASING_LINEAR, EASING_OUT
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new transition on the given chart and associated series.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Cleans up after the transition is complete.
    Gets the "buffer" series where values can be set.
    Gets the series whose values are to be animated by this transition.
    void
    Initializes the transition.
    protected void
    update(int progress)
    Updates the series and renderer at the given progress position (0 to 100).

    Methods inherited from class SeriesTransition

    animate, animateChart, getChart, getDuration, getEasing, paint, setChart, setDuration, setEasing, updateChart
    Modifier and Type
    Method
    Description
    boolean
    Allows the animation to reduce "repaint" calls when it returns false.
    void
    Applies all pending changes to the chart model and renderer using the current animation settings.
    Gets the ChartComponent that is the subject of the transition.
    int
    Gets the duration of the transition.
    int
    Gets the type of easing used in the transition.
    void
    Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.
    void
    Sets the ChartComponent that is the subject of the transition.
    void
    setDuration(int duration)
    Sets the duration of the transition in milliseconds.
    void
    setEasing(int easing)
    Sets the type of easing used in the transition.
    void
    Applies all pending changes to the chart model and renderer and repaints the chart.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
     
    boolean
    Indicates whether some other object is "equal to" this one.
    final Class
    Returns the runtime class of an object.
    int
    Returns a hash code value for the object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    Returns a string representation of the object.
    final void
    Causes current thread to wait until another thread invokes the method or the method for this object.
    final void
    wait(long timeout)
    Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
    final void
    wait(long timeout, int nanos)
    Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
  • Constructor Details

    • XYValueSeriesTransition

      public XYValueSeriesTransition(ChartComponent chart, XYValueSeries series)

      Creates a new transition on the given chart and associated series. The series should be one of the series rendered by the given chart.

      Parameters
      • chart: The ChartComponent that is being used to render the series.

      • series: The series whose data you wish to animate.

  • Method Details

    • initTransition

      public void initTransition()
      Initializes the transition. This can be overridden by subclasses to provide their own functionality to be executed just before the transition occurs.
      Overrides:
      initTransition in class SeriesTransition
    • cleanup

      protected void cleanup()
      Cleans up after the transition is complete.
      Overrides:
      cleanup in class SeriesTransition
    • update

      protected void update(int progress)

      Updates the series and renderer at the given progress position (0 to 100).

      Parameters
      • progress: The progress position in the motion. (0-100).
      Specified by:
      update in class SeriesTransition
    • getBuffer

      public XYValueSeries getBuffer()
      Gets the "buffer" series where values can be set. Any values set on the buffer will be applied to the target series during the course of the transition.
    • getSeries

      public XYValueSeries getSeries()
      Gets the series whose values are to be animated by this transition.