Package org.zkoss.zul
Class SimpleSingleValueCategoryModel
- java.lang.Object
-
- org.zkoss.zul.AbstractChartModel
-
- org.zkoss.zul.SimpleSingleValueCategoryModel
-
- All Implemented Interfaces:
java.io.Serializable
,ChartModel
,SingleValueCategoryModel
- Direct Known Subclasses:
SimplePieModel
public class SimpleSingleValueCategoryModel extends AbstractChartModel implements SingleValueCategoryModel
A Pie chart data model implementation ofSingleValueCategoryModel
. SimpleSingleValueCategoryModel used by PieChart and FunnelChart is a series of (Category, singleValue) data objects.- Author:
- henrichen, rwenzel
- See Also:
SingleValueCategoryModel
,Chart
, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.zul.AbstractChartModel
_listeners
-
-
Constructor Summary
Constructors Constructor Description SimpleSingleValueCategoryModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
clear the model.java.lang.Object
clone()
java.util.Collection<java.lang.Comparable<?>>
getCategories()
Get categories as a collection.java.lang.Comparable<?>
getCategory(int index)
Get category of the specified index (0 based).java.lang.Number
getValue(java.lang.Comparable<?> category)
Get value of the specified category.void
removeValue(java.lang.Comparable<?> category)
remove the value of the specified category.void
setValue(java.lang.Comparable<?> category, java.lang.Number value)
add or update the value of a specified category.-
Methods inherited from class org.zkoss.zul.AbstractChartModel
addChartDataListener, 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
-
-
-
-
Method Detail
-
getCategory
public java.lang.Comparable<?> getCategory(int index)
Description copied from interface:SingleValueCategoryModel
Get category of the specified index (0 based).- Specified by:
getCategory
in interfaceSingleValueCategoryModel
- Parameters:
index
- the index of the category.
-
getCategories
public java.util.Collection<java.lang.Comparable<?>> getCategories()
Description copied from interface:SingleValueCategoryModel
Get categories as a collection.- Specified by:
getCategories
in interfaceSingleValueCategoryModel
-
getValue
public java.lang.Number getValue(java.lang.Comparable<?> category)
Description copied from interface:SingleValueCategoryModel
Get value of the specified category.- Specified by:
getValue
in interfaceSingleValueCategoryModel
- Parameters:
category
- the pie category.
-
setValue
public void setValue(java.lang.Comparable<?> category, java.lang.Number value)
Description copied from interface:SingleValueCategoryModel
add or update the value of a specified category.- Specified by:
setValue
in interfaceSingleValueCategoryModel
- Parameters:
category
- the pie category.value
- the pie value.
-
removeValue
public void removeValue(java.lang.Comparable<?> category)
Description copied from interface:SingleValueCategoryModel
remove the value of the specified category.- Specified by:
removeValue
in interfaceSingleValueCategoryModel
- Parameters:
category
- the pie category.
-
clear
public void clear()
Description copied from interface:SingleValueCategoryModel
clear the model.- Specified by:
clear
in interfaceSingleValueCategoryModel
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classAbstractChartModel
-
-