|
||||||||||
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.SimpleHiLoModel
public class SimpleHiLoModel
A HiLo data model implementation of HiLoModel
.
A HiLo model is an model generally used in stock market to hold
(date, open, high, low, close, volume) tuple data objects .
HiLoModel
,
Chart
,
Serialized FormField Summary |
---|
Fields inherited from class org.zkoss.zul.AbstractChartModel |
---|
_listeners |
Constructor Summary | |
---|---|
SimpleHiLoModel()
|
Method Summary | |
---|---|
void |
addValue(java.util.Date date,
java.lang.Number open,
java.lang.Number high,
java.lang.Number low,
java.lang.Number close,
java.lang.Number volume)
Append an (date, open, high, low, close, volumn) tuple. |
void |
addValue(java.util.Date date,
java.lang.Number open,
java.lang.Number high,
java.lang.Number low,
java.lang.Number close,
java.lang.Number volume,
int index)
Add an (date, open, high, low, close, volumn) tuple at specified index. |
void |
clear()
clear this model. |
java.lang.Object |
clone()
|
java.lang.Number |
getClose(int index)
Get close value of a specified data index. |
int |
getDataCount()
Get data count. |
java.util.Date |
getDate(int index)
Get date of a specified data index. |
java.lang.Number |
getHigh(int index)
Get High value of a specified data index. |
java.lang.Number |
getLow(int index)
Get Low value of a specified data index. |
java.lang.Number |
getOpen(int index)
Get Open value of a specified data index. |
java.lang.Comparable<?> |
getSeries()
Get the only series. |
java.lang.Number |
getVolume(int index)
Get volume value of a specified data index. |
void |
removeValue(int index)
Remove (date, open, high, low, close, volumn) tuple of a data index. |
void |
setSeries(java.lang.Comparable<?> series)
Set the only series. |
void |
setValue(java.util.Date date,
java.lang.Number open,
java.lang.Number high,
java.lang.Number low,
java.lang.Number close,
java.lang.Number volume,
int index)
Replace an (date, open, high, low, close, volumn) tuple 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 |
Constructor Detail |
---|
public SimpleHiLoModel()
Method Detail |
---|
public java.lang.Comparable<?> getSeries()
HiLoModel
getSeries
in interface HiLoModel
public void setSeries(java.lang.Comparable<?> series)
HiLoModel
setSeries
in interface HiLoModel
series
- the only series in legend.public int getDataCount()
HiLoModel
getDataCount
in interface HiLoModel
public java.util.Date getDate(int index)
HiLoModel
getDate
in interface HiLoModel
public java.lang.Number getOpen(int index)
HiLoModel
getOpen
in interface HiLoModel
index
- the data index.public java.lang.Number getHigh(int index)
HiLoModel
getHigh
in interface HiLoModel
index
- the data index.public java.lang.Number getLow(int index)
HiLoModel
getLow
in interface HiLoModel
index
- the data index.public java.lang.Number getClose(int index)
HiLoModel
getClose
in interface HiLoModel
index
- the data index.public java.lang.Number getVolume(int index)
HiLoModel
getVolume
in interface HiLoModel
index
- the data index.public void addValue(java.util.Date date, java.lang.Number open, java.lang.Number high, java.lang.Number low, java.lang.Number close, java.lang.Number volume)
HiLoModel
addValue
in interface HiLoModel
date
- the dateopen
- the open value in the date.high
- the high value in the date.low
- the low value in the date.close
- the close value in the date.volume
- the trading volume in the date.public void addValue(java.util.Date date, java.lang.Number open, java.lang.Number high, java.lang.Number low, java.lang.Number close, java.lang.Number volume, int index)
HiLoModel
addValue
in interface HiLoModel
date
- the dateopen
- the open value in the date.high
- the high value in the date.low
- the low value in the date.close
- the close value in the date.volume
- the trading volumn in the date.index
- the data indexpublic void setValue(java.util.Date date, java.lang.Number open, java.lang.Number high, java.lang.Number low, java.lang.Number close, java.lang.Number volume, int index)
HiLoModel
setValue
in interface HiLoModel
date
- the dateopen
- the open value in the date.high
- the high value in the date.low
- the low value in the date.close
- the close value in the date.volume
- the trading volumn in the date.index
- the data indexpublic void removeValue(int index)
HiLoModel
removeValue
in interface HiLoModel
index
- the data index.public void clear()
HiLoModel
clear
in interface HiLoModel
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 |