Package org.zkoss.chart.model
Class DefaultFromToWeightModel
- java.lang.Object
-
- org.zkoss.chart.model.AbstractChartsModel
-
- org.zkoss.chart.model.DefaultFromToModel
-
- org.zkoss.chart.model.DefaultFromToWeightModel
-
- All Implemented Interfaces:
Serializable,ChartsModel,FromToModel,FromToWeightModel
public class DefaultFromToWeightModel extends DefaultFromToModel implements FromToWeightModel
A default implementation ofFromToWeightModel. A FromToWeight model is an N series of (from, to, weight) data objects.- Since:
- 7.2.1.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.zkoss.chart.model.DefaultFromToModel
DefaultFromToModel.FromToPair
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.model.DefaultFromToModel
_seriesList, _seriesMap
-
Fields inherited from class org.zkoss.chart.model.AbstractChartsModel
_listeners
-
-
Constructor Summary
Constructors Constructor Description DefaultFromToWeightModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(Comparable<?> series, String from, String to)Append a (from, to) into a series.voidaddValue(Comparable<?> series, String from, String to, int index)Add a (from, to) into a series at specified index.voidaddValue(Comparable<?> series, String from, String to, Number weight)Append a (from, to, weight) into a series.voidaddValue(Comparable<?> series, String from, String to, Number weight, int index)Add a (from, to, weight) into a series at the specified index.NumbergetWeight(Comparable<?> series, int index)Get weight value of a specified series and data index.voidremoveValue(Comparable<?> series, int index)Remove (from, to) value of a specified series and data index.voidsetValue(Comparable<?> series, String from, String to, int index)Replace the value of the new (from, to) into a series at specified index.voidsetValue(Comparable<?> series, String from, String to, Number weight, int index)Replace a (from, to, weight) into a series at the specified index.-
Methods inherited from class org.zkoss.chart.model.DefaultFromToModel
clear, clone, getDataCount, getFrom, getSeries, getSeries, getTo, isAutoSort, removeSeries, setAutoSort
-
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
-
Methods inherited from interface org.zkoss.chart.model.FromToModel
clear, getDataCount, getFrom, getSeries, getSeries, getTo, isAutoSort, removeSeries, setAutoSort
-
-
-
-
Method Detail
-
setValue
public void setValue(Comparable<?> series, String from, String to, int index)
Description copied from interface:FromToModelReplace the value of the new (from, to) into a series at specified index.- Specified by:
setValuein interfaceFromToModel- Overrides:
setValuein classDefaultFromToModel- Parameters:
series- the series.from- the from value.to- the to value.index- the data index.
-
addValue
public void addValue(Comparable<?> series, String from, String to)
Description copied from interface:FromToModelAppend a (from, to) into a series.- Specified by:
addValuein interfaceFromToModel- Overrides:
addValuein classDefaultFromToModel- Parameters:
series- the series.from- the from value.to- the to value.
-
addValue
public void addValue(Comparable<?> series, String from, String to, int index)
Description copied from interface:FromToModelAdd a (from, to) into a series at specified index.- Specified by:
addValuein interfaceFromToModel- Overrides:
addValuein classDefaultFromToModel- Parameters:
series- the series.from- the from value.to- the to value.index- the data index.
-
getWeight
public Number getWeight(Comparable<?> series, int index)
Description copied from interface:FromToWeightModelGet weight value of a specified series and data index.- Specified by:
getWeightin interfaceFromToWeightModel- Parameters:
series- the series.index- the data index.
-
addValue
public void addValue(Comparable<?> series, String from, String to, Number weight)
Description copied from interface:FromToWeightModelAppend a (from, to, weight) into a series.- Specified by:
addValuein interfaceFromToWeightModel- Parameters:
series- the series.from- the from value.to- the to value.weight- the weight value.
-
addValue
public void addValue(Comparable<?> series, String from, String to, Number weight, int index)
Description copied from interface:FromToWeightModelAdd a (from, to, weight) into a series at the specified index.- Specified by:
addValuein interfaceFromToWeightModel- Parameters:
series- the series.from- the from value.to- the to value.weight- the weight value.index- the data index.
-
setValue
public void setValue(Comparable<?> series, String from, String to, Number weight, int index)
Description copied from interface:FromToWeightModelReplace a (from, to, weight) into a series at the specified index.- Specified by:
setValuein interfaceFromToWeightModel- Parameters:
series- the series.from- the from value.to- the to value.weight- the weight value.index- the data index.
-
removeValue
public void removeValue(Comparable<?> series, int index)
Description copied from interface:FromToModelRemove (from, to) value of a specified series and data index.- Specified by:
removeValuein interfaceFromToModel- Overrides:
removeValuein classDefaultFromToModel- Parameters:
series- the series.index- the data index.
-
-