|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zul.AbstractChartModel org.zkoss.zul.SimpleXYModel
public class SimpleXYModel
A XY data model implementation of XYModel
.
A XY model is an N series of (X, Y) data objects .
XYModel
,
Chart
,
Serialized FormNested Class Summary | |
---|---|
protected static class |
SimpleXYModel.XYPair
|
Field Summary | |
---|---|
protected java.util.List<java.lang.Comparable<?>> |
_seriesList
|
protected java.util.Map<java.lang.Comparable<?>,java.util.List<SimpleXYModel.XYPair>> |
_seriesMap
|
Fields inherited from class org.zkoss.zul.AbstractChartModel |
---|
_listeners |
Constructor Summary | |
---|---|
SimpleXYModel()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.zkoss.zul.AbstractChartModel |
---|
addChartDataListener, fireEvent, fireEvent, removeChartDataListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.zkoss.zul.ChartModel |
---|
addChartDataListener, removeChartDataListener |
Field Detail |
---|
protected java.util.Map<java.lang.Comparable<?>,java.util.List<SimpleXYModel.XYPair>> _seriesMap
protected java.util.List<java.lang.Comparable<?>> _seriesList
Constructor Detail |
---|
public SimpleXYModel()
Method Detail |
---|
public java.lang.Comparable<?> getSeries(int index)
XYModel
getSeries
in interface XYModel
public java.util.Collection<java.lang.Comparable<?>> getSeries()
XYModel
getSeries
in interface 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
getX
in interface XYModel
series
- the series.index
- the data index.public java.lang.Number getY(java.lang.Comparable<?> series, int index)
XYModel
getY
in interface XYModel
series
- the series.index
- the data index.public void setValue(java.lang.Comparable<?> series, java.lang.Number x, java.lang.Number y, int index)
XYModel
setValue
in interface XYModel
series
- the seriesx
- the x valuey
- the y valueindex
- the data indexpublic void addValue(java.lang.Comparable<?> series, java.lang.Number x, java.lang.Number y)
XYModel
addValue
in interface XYModel
series
- the series.x
- the x value.y
- the y value.public void addValue(java.lang.Comparable<?> series, java.lang.Number x, java.lang.Number y, int index)
XYModel
addValue
in interface XYModel
series
- the series.x
- the x value.y
- the y value.index
- the data index.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
clear
in interface XYModel
public java.lang.Object clone()
clone
in class AbstractChartModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |