JIDE 3.4.0

com.jidesoft.chart.model
Class LeanMemoryChartModel

java.lang.Object
  extended by com.jidesoft.chart.model.LeanMemoryChartModel
All Implemented Interfaces:
ChartModel, LeanChartModel, Named, Iterable<Chartable>

public final class LeanMemoryChartModel
extends Object
implements LeanChartModel


Constructor Summary
LeanMemoryChartModel(double[][] points)
           
LeanMemoryChartModel(List<double[]> points)
           
LeanMemoryChartModel(String name, double[][] points)
           
LeanMemoryChartModel(String name, List<double[]> points)
           
 
Method Summary
 void addChartModelListener(ChartModelListener listener)
          Register the listener's interest in this chart model.
 boolean equals(Object obj)
           
protected  void fireModelChanged()
           
 String getName()
          The name of a ChartModel is important, as different chart models are assumed to have different names.
 Chartable getPoint(int n)
          Gets the nth point.
 int getPointCount()
          Gets the number of points in the data set
 double[] getPointPositions(int n)
           
 int hashCode()
           
protected  void init()
           
 boolean isCyclical()
          Should a line be drawn from the last to the first point?
 Iterator<Chartable> iterator()
           
 void removeChartModelListener(ChartModelListener listener)
          De-register the listener's interest in this chart model.
 void setCyclical(boolean cyclical)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeanMemoryChartModel

public LeanMemoryChartModel(List<double[]> points)

LeanMemoryChartModel

public LeanMemoryChartModel(double[][] points)

LeanMemoryChartModel

public LeanMemoryChartModel(String name,
                            List<double[]> points)

LeanMemoryChartModel

public LeanMemoryChartModel(String name,
                            double[][] points)
Method Detail

init

protected void init()

getName

public String getName()
Description copied from interface: ChartModel
The name of a ChartModel is important, as different chart models are assumed to have different names. If you're adding multiple models to a Chart, make sure they have different names.

Specified by:
getName in interface ChartModel
Specified by:
getName in interface Named
Returns:
a distinct name for this data set

getPoint

public Chartable getPoint(int n)
Description copied from interface: ChartModel
Gets the nth point. The first point has index 0.

Specified by:
getPoint in interface ChartModel
Parameters:
n - the index
Returns:
the nth point in the ChartModel.

getPointPositions

public double[] getPointPositions(int n)
Specified by:
getPointPositions in interface LeanChartModel

getPointCount

public int getPointCount()
Description copied from interface: ChartModel
Gets the number of points in the data set

Specified by:
getPointCount in interface ChartModel
Returns:
the number of points

setCyclical

public void setCyclical(boolean cyclical)

isCyclical

public boolean isCyclical()
Description copied from interface: ChartModel
Should a line be drawn from the last to the first point?

Specified by:
isCyclical in interface ChartModel
Returns:
whether the model represents a cycle of values

fireModelChanged

protected void fireModelChanged()

addChartModelListener

public void addChartModelListener(ChartModelListener listener)
Description copied from interface: ChartModel
Register the listener's interest in this chart model.

Specified by:
addChartModelListener in interface ChartModel
Parameters:
listener - the listener that will receive events

removeChartModelListener

public void removeChartModelListener(ChartModelListener listener)
Description copied from interface: ChartModel
De-register the listener's interest in this chart model.

Specified by:
removeChartModelListener in interface ChartModel
Parameters:
listener - the listener that will no longer receive events

iterator

public Iterator<Chartable> iterator()
Specified by:
iterator in interface Iterable<Chartable>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

JIDE 3.4.0