|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.model.LeanMemoryChartModel
public final class LeanMemoryChartModel
The LeanMemoryChartModel is designed for cases where you have a large data set that is read-only. You cannot change the points of the model after you have created it. The internal representation of the points uses less memory than a conventional ChartModel such as a DefaultChartModel, which is why this class is well-suited to large data sets. This class is a good choice, for example, if you are retrieving data from a database for display purposes only.
Constructor Summary | |
---|---|
LeanMemoryChartModel(double[][] points)
Constructs a ChartModel from an array of x, y double pairs |
|
LeanMemoryChartModel(List<double[]> points)
Constructs a ChartModel from a list of x, y double pairs |
|
LeanMemoryChartModel(String name,
double[][] points)
Constructs a ChartModel from an array of x, y double pairs |
|
LeanMemoryChartModel(String name,
List<double[]> points)
Constructs a ChartModel from a list of x, y double pairs |
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)
Returns the x and y coordinates of the nth point |
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)
Specify whether the chart model is cyclical. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LeanMemoryChartModel(List<double[]> points)
points
- a list of x, y double coordinatespublic LeanMemoryChartModel(double[][] points)
points
- an array of x, y double coordinatespublic LeanMemoryChartModel(String name, List<double[]> points)
name
- the name of the modelpoints
- a list of x, y double coordinatespublic LeanMemoryChartModel(String name, double[][] points)
name
- the name of the modelpoints
- an array of x, y double coordinatesMethod Detail |
---|
protected void init()
public String getName()
Chart
, make sure they have different names.
getName
in interface ChartModel
getName
in interface Named
public Chartable getPoint(int n)
getPoint
in interface ChartModel
n
- the index
ChartModel
.public double[] getPointPositions(int n)
getPointPositions
in interface LeanChartModel
n
- the index of the point of interest
public int getPointCount()
getPointCount
in interface ChartModel
public void setCyclical(boolean cyclical)
cyclical
- a boolean to indicate whether the chart model is cyclicalpublic boolean isCyclical()
isCyclical
in interface ChartModel
protected void fireModelChanged()
public void addChartModelListener(ChartModelListener listener)
addChartModelListener
in interface ChartModel
listener
- the listener that will receive eventspublic void removeChartModelListener(ChartModelListener listener)
removeChartModelListener
in interface ChartModel
listener
- the listener that will no longer receive eventspublic Iterator<Chartable> iterator()
iterator
in interface Iterable<Chartable>
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |