public class SimpleXYModel extends AbstractChartModel implements XYModel
XYModel
.
A XY model is an N series of (X, Y) data objects .XYModel
,
Chart
,
Serialized FormModifier and Type | Class and Description |
---|---|
protected static class |
SimpleXYModel.XYPair |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Comparable<?>> |
_seriesList |
protected java.util.Map<java.lang.Comparable<?>,java.util.List<SimpleXYModel.XYPair>> |
_seriesMap |
_listeners
Constructor and Description |
---|
SimpleXYModel() |
Modifier and Type | Method and Description |
---|---|
void |
addValue(java.lang.Comparable<?> series,
java.lang.Number x,
java.lang.Number y)
Append an (x,y) into a series.
|
void |
addValue(java.lang.Comparable<?> series,
java.lang.Number x,
java.lang.Number y,
int index)
Add an (x,y) into a series at specified index.
|
void |
clear()
clear this model.
|
java.lang.Object |
clone() |
int |
getDataCount(java.lang.Comparable<?> series)
Get data count of a specified series.
|
java.util.Collection<java.lang.Comparable<?>> |
getSeries()
Get all series as a collection.
|
java.lang.Comparable<?> |
getSeries(int index)
Get a series of the specified index;
|
java.lang.Number |
getX(java.lang.Comparable<?> series,
int index)
Get X value of a specified series and data index.
|
java.lang.Number |
getY(java.lang.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(java.lang.Comparable<?> series)
Remove data of a specified series.
|
void |
removeValue(java.lang.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(java.lang.Comparable<?> series,
java.lang.Number x,
java.lang.Number y,
int index)
Replace the value of the new (x,y) into a series at specified index.
|
addChartDataListener, fireEvent, fireEvent, removeChartDataListener
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChartDataListener, removeChartDataListener
protected java.util.Map<java.lang.Comparable<?>,java.util.List<SimpleXYModel.XYPair>> _seriesMap
protected java.util.List<java.lang.Comparable<?>> _seriesList
public java.lang.Comparable<?> getSeries(int index)
XYModel
public java.util.Collection<java.lang.Comparable<?>> getSeries()
XYModel
public int getDataCount(java.lang.Comparable<?> series)
XYModel
getDataCount
in interface XYModel
series
- the specified series.public java.lang.Number getX(java.lang.Comparable<?> series, int index)
XYModel
public java.lang.Number getY(java.lang.Comparable<?> series, int index)
XYModel
public void setValue(java.lang.Comparable<?> series, java.lang.Number x, java.lang.Number y, int index)
XYModel
public void addValue(java.lang.Comparable<?> series, java.lang.Number x, java.lang.Number y)
XYModel
public void addValue(java.lang.Comparable<?> series, java.lang.Number x, java.lang.Number y, int index)
XYModel
public void setAutoSort(boolean auto)
XYModel
setAutoSort
in interface XYModel
public boolean isAutoSort()
XYModel
isAutoSort
in interface XYModel
public void removeSeries(java.lang.Comparable<?> series)
XYModel
removeSeries
in interface XYModel
series
- the seriespublic void removeValue(java.lang.Comparable<?> series, int index)
XYModel
removeValue
in interface XYModel
series
- the series.index
- the data index.public void clear()
XYModel
public java.lang.Object clone()
clone
in class AbstractChartModel
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.