Package org.zkoss.chart.model
Class DefaultBoxPlotModel
- java.lang.Object
-
- org.zkoss.chart.model.AbstractChartsModel
-
- org.zkoss.chart.model.DefaultBoxPlotModel
-
- All Implemented Interfaces:
Serializable,BoxPlotModel,ChartsModel
public class DefaultBoxPlotModel extends AbstractChartsModel implements BoxPlotModel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultBoxPlotModel.BoxplotTuple
-
Field Summary
Fields Modifier and Type Field Description protected List<Comparable<?>>_seriesListprotected Map<Comparable<?>,List<DefaultBoxPlotModel.BoxplotTuple>>_seriesMap-
Fields inherited from class org.zkoss.chart.model.AbstractChartsModel
_listeners
-
-
Constructor Summary
Constructors Constructor Description DefaultBoxPlotModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high)Append a (low, q1, median, q3, high) value into the the given series.voidaddValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)Add a (low, q1, median, q3, high) value into the the given series at the given index.voidaddValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high)Append a (x, low, q1, median, q3, high) value into the the given series.voidaddValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)Add a (x, low, q1, median, q3, high) value into the the given series at the given index.voidaddValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high)Append a (name, low, q1, median, q3, high) value into the the given series.voidaddValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)Add a (name, low, q1, median, q3, high) value into the the given series at the given index.voidclear()clear this model.Objectclone()intgetDataCount(Comparable<?> series)Get data count of a specified series.NumbergetHigh(Comparable<?> series, int index)Get the high value from the specified series at the given index.NumbergetLow(Comparable<?> series, int index)Get the low value from the specified series at the given index.NumbergetMedian(Comparable<?> series, int index)Get the median value from the specified series at the given index.StringgetName(Comparable<?> series, int index)Get the name value from the specified series at the given index.NumbergetQ1(Comparable<?> series, int index)Get the q1 value from the specified series at the given index.NumbergetQ3(Comparable<?> series, int index)Get the q3 value from the specified series at the given index.Collection<Comparable<?>>getSeries()Get all series as a collection.Comparable<?>getSeries(int index)Get a series of the specified index;NumbergetX(Comparable<?> series, int index)Get the x value from the specified series at the given index.voidremoveSeries(Comparable<?> series)Remove data of a specified series.voidremoveValue(Comparable<?> series, int index)Remove a (x, low, q1, median, q3, high) value from the specified series at the given index.voidsetValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)Replace the (low, q1, median, q3, high) value at the given index of the specified series.voidsetValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)Replace the (x, low, q1, median, q3, high) value at the given index of the specified series.voidsetValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)Replace the (name, low, q1, median, q3, high) value at the given index of the specified series.-
Methods inherited from class org.zkoss.chart.model.AbstractChartsModel
addChartsDataListener, fireEvent, removeChartsDataListener
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.chart.model.ChartsModel
addChartsDataListener, removeChartsDataListener
-
-
-
-
Field Detail
-
_seriesMap
protected Map<Comparable<?>,List<DefaultBoxPlotModel.BoxplotTuple>> _seriesMap
-
_seriesList
protected List<Comparable<?>> _seriesList
-
-
Method Detail
-
getSeries
public Comparable<?> getSeries(int index)
Description copied from interface:BoxPlotModelGet a series of the specified index;- Specified by:
getSeriesin interfaceBoxPlotModel
-
getSeries
public Collection<Comparable<?>> getSeries()
Description copied from interface:BoxPlotModelGet all series as a collection.- Specified by:
getSeriesin interfaceBoxPlotModel
-
getDataCount
public int getDataCount(Comparable<?> series)
Description copied from interface:BoxPlotModelGet data count of a specified series.- Specified by:
getDataCountin interfaceBoxPlotModel- Parameters:
series- the specified series.
-
getName
public String getName(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the name value from the specified series at the given index.- Specified by:
getNamein interfaceBoxPlotModel- Returns:
- name the name value
-
getX
public Number getX(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the x value from the specified series at the given index.- Specified by:
getXin interfaceBoxPlotModel- Returns:
- x the x value
-
getLow
public Number getLow(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the low value from the specified series at the given index.- Specified by:
getLowin interfaceBoxPlotModel- Returns:
- low the low value
-
getQ1
public Number getQ1(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the q1 value from the specified series at the given index.- Specified by:
getQ1in interfaceBoxPlotModel- Returns:
- q1 the q1 value
-
getMedian
public Number getMedian(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the median value from the specified series at the given index.- Specified by:
getMedianin interfaceBoxPlotModel- Returns:
- median the median value
-
getQ3
public Number getQ3(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the q3 value from the specified series at the given index.- Specified by:
getQ3in interfaceBoxPlotModel- Returns:
- q3 the q3 value
-
getHigh
public Number getHigh(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelGet the high value from the specified series at the given index.- Specified by:
getHighin interfaceBoxPlotModel- Returns:
- high the high value
-
setValue
public void setValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModelReplace the (low, q1, median, q3, high) value at the given index of the specified series.- Specified by:
setValuein interfaceBoxPlotModel- Parameters:
series- the serieslow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high valueindex- the data index
-
setValue
public void setValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModelReplace the (x, low, q1, median, q3, high) value at the given index of the specified series.- Specified by:
setValuein interfaceBoxPlotModel- Parameters:
series- the seriesx- the x valuelow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high valueindex- the data index
-
setValue
public void setValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModelReplace the (name, low, q1, median, q3, high) value at the given index of the specified series.- Specified by:
setValuein interfaceBoxPlotModel- Parameters:
series- the serieslow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high valueindex- the data index
-
addValue
public void addValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high)
Description copied from interface:BoxPlotModelAppend a (low, q1, median, q3, high) value into the the given series.- Specified by:
addValuein interfaceBoxPlotModel- Parameters:
series- the series to append this value intolow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high value
-
addValue
public void addValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high)
Description copied from interface:BoxPlotModelAppend a (x, low, q1, median, q3, high) value into the the given series.- Specified by:
addValuein interfaceBoxPlotModel- Parameters:
series- the series to append this value intox- the x valuelow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high value
-
addValue
public void addValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high)
Description copied from interface:BoxPlotModelAppend a (name, low, q1, median, q3, high) value into the the given series.- Specified by:
addValuein interfaceBoxPlotModel- Parameters:
series- the series to append this value intoname- the name valuelow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high value
-
addValue
public void addValue(Comparable<?> series, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModelAdd a (low, q1, median, q3, high) value into the the given series at the given index.- Specified by:
addValuein interfaceBoxPlotModel- Parameters:
series- the series to append this value intolow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high valueindex- the index value
-
addValue
public void addValue(Comparable<?> series, Number x, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModelAdd a (x, low, q1, median, q3, high) value into the the given series at the given index.- Specified by:
addValuein interfaceBoxPlotModel- Parameters:
series- the series to append this value intox- the x valuelow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high valueindex- the index value
-
addValue
public void addValue(Comparable<?> series, String name, Number low, Number q1, Number median, Number q3, Number high, int index)
Description copied from interface:BoxPlotModelAdd a (name, low, q1, median, q3, high) value into the the given series at the given index.- Specified by:
addValuein interfaceBoxPlotModel- Parameters:
series- the series to append this value intoname- the name valuelow- the low valueq1- the q1 valuemedian- the median valueq3- the q1 valuehigh- the high valueindex- the index value
-
removeSeries
public void removeSeries(Comparable<?> series)
Description copied from interface:BoxPlotModelRemove data of a specified series.- Specified by:
removeSeriesin interfaceBoxPlotModel- Parameters:
series- the series
-
removeValue
public void removeValue(Comparable<?> series, int index)
Description copied from interface:BoxPlotModelRemove a (x, low, q1, median, q3, high) value from the specified series at the given index.- Specified by:
removeValuein interfaceBoxPlotModel- Parameters:
series- the series.index- the data index.
-
clear
public void clear()
Description copied from interface:BoxPlotModelclear this model.- Specified by:
clearin interfaceBoxPlotModel
-
clone
public Object clone()
- Overrides:
clonein classAbstractChartsModel
-
-