Package org.zkoss.zul
Class SimpleCategoryModel
java.lang.Object
org.zkoss.zul.AbstractChartModel
org.zkoss.zul.SimpleCategoryModel
- All Implemented Interfaces:
Serializable,CategoryModel,ChartModel
A Category data model implementation of
CategoryModel.
A Category model is an N series of (category, value) data objects.- Author:
- henrichen
- See Also:
-
Field Summary
Fields inherited from class org.zkoss.zul.AbstractChartModel
_listeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clear the model.clone()Collection<Comparable<?>>Get categories of a specified series as a collection.Comparable<?>getCategory(int index) Get a category of the specified index;Collection<List<Comparable<?>>>getKeys()Get (series, category) pairs of this chart data model.Collection<Comparable<?>>Get all series as a collection.Comparable<?>getSeries(int index) Get a series of the specified index;getValue(Comparable<?> series, Comparable<?> category) Get value of the specified series and category.voidremoveValue(Comparable<?> series, Comparable<?> category) remove the value of the specified series and category.voidsetValue(Comparable<?> series, Comparable<?> category, Number value) add or update the value of a specified series and category.Methods inherited from class org.zkoss.zul.AbstractChartModel
addChartDataListener, fireEvent, removeChartDataListenerMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.zkoss.zul.ChartModel
addChartDataListener, removeChartDataListener
-
Constructor Details
-
SimpleCategoryModel
public SimpleCategoryModel()
-
-
Method Details
-
getSeries
Description copied from interface:CategoryModelGet a series of the specified index;- Specified by:
getSeriesin interfaceCategoryModel
-
getSeries
Description copied from interface:CategoryModelGet all series as a collection.- Specified by:
getSeriesin interfaceCategoryModel
-
getCategory
Description copied from interface:CategoryModelGet a category of the specified index;- Specified by:
getCategoryin interfaceCategoryModel
-
getCategories
Description copied from interface:CategoryModelGet categories of a specified series as a collection.- Specified by:
getCategoriesin interfaceCategoryModel
-
getKeys
Description copied from interface:CategoryModelGet (series, category) pairs of this chart data model. The returned value is a collection of List where list.get(0) is the series, list.get(1) is the category, in the order theCategoryModel.setValue(java.lang.Comparable<?>, java.lang.Comparable<?>, java.lang.Number)is called.- Specified by:
getKeysin interfaceCategoryModel
-
getValue
Description copied from interface:CategoryModelGet value of the specified series and category.- Specified by:
getValuein interfaceCategoryModel- Parameters:
series- the seriescategory- the category.
-
setValue
Description copied from interface:CategoryModeladd or update the value of a specified series and category.- Specified by:
setValuein interfaceCategoryModel- Parameters:
series- the seriescategory- the category.value- the value
-
removeValue
Description copied from interface:CategoryModelremove the value of the specified series and category.- Specified by:
removeValuein interfaceCategoryModel- Parameters:
series- the seriescategory- the category.
-
clear
public void clear()Description copied from interface:CategoryModelclear the model.- Specified by:
clearin interfaceCategoryModel
-
clone
- Overrides:
clonein classAbstractChartModel
-