public class SimpleXYModel extends AbstractChartModel implements XYModel
XYModel.
A XY model is an N series of (X, Y) data objects .XYModel,
Chart,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected static class |
SimpleXYModel.XYPair |
| Modifier and Type | Field and Description |
|---|---|
protected List<Comparable<?>> |
_seriesList |
protected Map<Comparable<?>,List<SimpleXYModel.XYPair>> |
_seriesMap |
_listeners| Constructor and Description |
|---|
SimpleXYModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(Comparable<?> series,
Number x,
Number y)
Append an (x,y) into a series.
|
void |
addValue(Comparable<?> series,
Number x,
Number y,
int index)
Add an (x,y) into a series at specified index.
|
void |
clear()
clear this model.
|
Object |
clone() |
int |
getDataCount(Comparable<?> series)
Get data count of a specified series.
|
Collection<Comparable<?>> |
getSeries()
Get all series as a collection.
|
Comparable<?> |
getSeries(int index)
Get a series of the specified index;
|
Number |
getX(Comparable<?> series,
int index)
Get X value of a specified series and data index.
|
Number |
getY(Comparable<?> series,
int index)
Get Y value of a specified series and data index.
|
boolean |
isAutoSort()
check whether to autosort on x value for each series; default is true.
|
void |
removeSeries(Comparable<?> series)
Remove data of a specified series.
|
void |
removeValue(Comparable<?> series,
int index)
Remove (x,y) value of a specified series and data index.
|
void |
setAutoSort(boolean auto)
Set model to autosort on x value for each series.
|
void |
setValue(Comparable<?> series,
Number x,
Number y,
int index)
Replace the value of the new (x,y) into a series at specified index.
|
addChartDataListener, fireEvent, fireEvent, removeChartDataListenerequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChartDataListener, removeChartDataListenerprotected Map<Comparable<?>,List<SimpleXYModel.XYPair>> _seriesMap
protected List<Comparable<?>> _seriesList
public Comparable<?> getSeries(int index)
XYModelpublic Collection<Comparable<?>> getSeries()
XYModelpublic int getDataCount(Comparable<?> series)
XYModelgetDataCount in interface XYModelseries - the specified series.public Number getX(Comparable<?> series, int index)
XYModelpublic Number getY(Comparable<?> series, int index)
XYModelpublic void setValue(Comparable<?> series, Number x, Number y, int index)
XYModelpublic void addValue(Comparable<?> series, Number x, Number y)
XYModelpublic void addValue(Comparable<?> series, Number x, Number y, int index)
XYModelpublic void setAutoSort(boolean auto)
XYModelsetAutoSort in interface XYModelpublic boolean isAutoSort()
XYModelisAutoSort in interface XYModelpublic void removeSeries(Comparable<?> series)
XYModelremoveSeries in interface XYModelseries - the seriespublic void removeValue(Comparable<?> series, int index)
XYModelremoveValue in interface XYModelseries - the series.index - the data index.public void clear()
XYModelpublic Object clone()
clone in class AbstractChartModelCopyright © 2015. All rights reserved.