JIDE 3.5.15

com.jidesoft.chart.model
Class ModelMorpher.TransitionPoint

java.lang.Object
  extended by com.jidesoft.chart.model.ChartPoint
      extended by com.jidesoft.chart.model.ModelMorpher.TransitionPoint
All Implemented Interfaces:
Chartable, Highlightable, Nameable, Named, Comparable<Chartable>
Enclosing class:
ModelMorpher

public static class ModelMorpher.TransitionPoint
extends ChartPoint

A class specialised for the transition task - it knows where it is moving from and where to, as well as its current position. It could also be given a strategy of how to get there, so that different points can use different strategies to get there.


Constructor Summary
ModelMorpher.TransitionPoint()
          Create a new Transition Point
ModelMorpher.TransitionPoint(Chartable source, Chartable target)
          Create a transition point using the supplied source and target points
 
Method Summary
 double getPosition()
          Returns the position of the transition on a scale from 0 (source) to 1 (target)
 Chartable getSource()
          Returns the point before the transition
 Chartable getTarget()
          Returns the point after the transition
 void setPosition(double position)
          Specify the position of the transition on a scale from 0 (source) to 1 (target)
 void setSource(Chartable source)
          Specify the point before the transition
 void setTarget(Chartable target)
          Specify the point after the transition
protected  void update()
          Update the location of the point according to the position and using the source and target locations.
 
Methods inherited from class com.jidesoft.chart.model.ChartPoint
compareTo, equals, getHighlight, getName, getX, getY, hashCode, isHighlight, setHighlight, setName, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelMorpher.TransitionPoint

public ModelMorpher.TransitionPoint()
Create a new Transition Point


ModelMorpher.TransitionPoint

public ModelMorpher.TransitionPoint(Chartable source,
                                    Chartable target)
Create a transition point using the supplied source and target points

Parameters:
source - the location of the point before the transition
target - the location of the point after the transition
Method Detail

getSource

public Chartable getSource()
Returns the point before the transition

Returns:
the point before the transition

setSource

public void setSource(Chartable source)
Specify the point before the transition

Parameters:
source - the point before the transition

getTarget

public Chartable getTarget()
Returns the point after the transition

Returns:
the point after the transition

setTarget

public void setTarget(Chartable target)
Specify the point after the transition

Parameters:
target - the point after the transition

getPosition

public double getPosition()
Returns the position of the transition on a scale from 0 (source) to 1 (target)

Returns:
the position

setPosition

public void setPosition(double position)
Specify the position of the transition on a scale from 0 (source) to 1 (target)

Parameters:
position - the position of the transition on a scale from 0 (source) to 1 (target)

update

protected void update()
Update the location of the point according to the position and using the source and target locations.


JIDE 3.5.15