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 void
addValue(Comparable<?> series, String from, String to)
Append a (from, to) into a series.void
addValue(Comparable<?> series, String from, String to, int index)
Add a (from, to) into a series at specified index.void
addValue(Comparable<?> series, String from, String to, Number weight)
Append a (from, to, weight) into a series.void
addValue(Comparable<?> series, String from, String to, Number weight, int index)
Add a (from, to, weight) into a series at the specified index.Number
getWeight(Comparable<?> series, int index)
Get weight value of a specified series and data index.void
removeValue(Comparable<?> series, int index)
Remove (from, to) value of a specified series and data index.void
setValue(Comparable<?> series, String from, String to, int index)
Replace the value of the new (from, to) into a series at specified index.void
setValue(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:FromToModel
Replace the value of the new (from, to) into a series at specified index.- Specified by:
setValue
in interfaceFromToModel
- Overrides:
setValue
in 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:FromToModel
Append a (from, to) into a series.- Specified by:
addValue
in interfaceFromToModel
- Overrides:
addValue
in 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:FromToModel
Add a (from, to) into a series at specified index.- Specified by:
addValue
in interfaceFromToModel
- Overrides:
addValue
in 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:FromToWeightModel
Get weight value of a specified series and data index.- Specified by:
getWeight
in 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:FromToWeightModel
Append a (from, to, weight) into a series.- Specified by:
addValue
in 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:FromToWeightModel
Add a (from, to, weight) into a series at the specified index.- Specified by:
addValue
in 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:FromToWeightModel
Replace a (from, to, weight) into a series at the specified index.- Specified by:
setValue
in 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:FromToModel
Remove (from, to) value of a specified series and data index.- Specified by:
removeValue
in interfaceFromToModel
- Overrides:
removeValue
in classDefaultFromToModel
- Parameters:
series
- the series.index
- the data index.
-
-