JIDE 3.5.15

com.jidesoft.chart.model
Interface ChartModel

All Superinterfaces:
Iterable<Chartable>, Named
All Known Subinterfaces:
AnnotatedChartModel, LeanChartModel
All Known Implementing Classes:
AbstractDelegatingChartModel, AnnotatedChartModelAdapter, AverageChartModel, ChartableTableModel, CopiedChartModel, DefaultChartModel, FilterableChartModel, LeanMemoryChartModel, SamplingModel, SelectableChartModel, SortedChartModel, SummingChartModel, TableToChartAdapter, TransformingChartModel, TransposingChartModel, WaterfallModelAdapter

public interface ChartModel
extends Named, Iterable<Chartable>

This is the main interface for the models supported by the Chart component. As a convenience to the user of this model, we extend Iterable<Chartable> so that the user can easily iterate over the chartable points that the model contains.

See Also:
Chart.setModel(ChartModel), Chart.addModel(ChartModel)

Method Summary
 void addChartModelListener(ChartModelListener listener)
          Register the listener's interest in this chart model.
 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
 boolean isCyclical()
          Should a line be drawn from the last to the first point?
 void removeChartModelListener(ChartModelListener listener)
          De-register the listener's interest in this chart model.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getName

String getName()
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 Named
Returns:
a distinct name for this data set

getPoint

Chartable getPoint(int n)
Gets the nth point. The first point has index 0.

Parameters:
n - the index
Returns:
the nth point in the ChartModel.

getPointCount

int getPointCount()
Gets the number of points in the data set

Returns:
the number of points

isCyclical

boolean isCyclical()
Should a line be drawn from the last to the first point?

Returns:
whether the model represents a cycle of values

addChartModelListener

void addChartModelListener(ChartModelListener listener)
Register the listener's interest in this chart model.

Parameters:
listener - the listener that will receive events

removeChartModelListener

void removeChartModelListener(ChartModelListener listener)
De-register the listener's interest in this chart model.

Parameters:
listener - the listener that will no longer receive events

JIDE 3.5.15