Package org.zkoss.zul
Class SimpleCategoryModel
- java.lang.Object
-
- org.zkoss.zul.AbstractChartModel
-
- org.zkoss.zul.SimpleCategoryModel
-
- All Implemented Interfaces:
java.io.Serializable,CategoryModel,ChartModel
public class SimpleCategoryModel extends AbstractChartModel implements CategoryModel
A Category data model implementation ofCategoryModel. A Category model is an N series of (category, value) data objects.- Author:
- henrichen
- See Also:
CategoryModel,Chart, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.zul.AbstractChartModel
_listeners
-
-
Constructor Summary
Constructors Constructor Description SimpleCategoryModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()clear the model.java.lang.Objectclone()java.util.Collection<java.lang.Comparable<?>>getCategories()Get categories of a specified series as a collection.java.lang.Comparable<?>getCategory(int index)Get a category of the specified index;java.util.Collection<java.util.List<java.lang.Comparable<?>>>getKeys()Get (series, category) pairs of this chart data model.java.util.Collection<java.lang.Comparable<?>>getSeries()Get all series as a collection.java.lang.Comparable<?>getSeries(int index)Get a series of the specified index;java.lang.NumbergetValue(java.lang.Comparable<?> series, java.lang.Comparable<?> category)Get value of the specified series and category.voidremoveValue(java.lang.Comparable<?> series, java.lang.Comparable<?> category)remove the value of the specified series and category.voidsetValue(java.lang.Comparable<?> series, java.lang.Comparable<?> category, java.lang.Number value)add or update the value of a specified series and 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
-
getSeries
public java.lang.Comparable<?> getSeries(int index)
Description copied from interface:CategoryModelGet a series of the specified index;- Specified by:
getSeriesin interfaceCategoryModel
-
getSeries
public java.util.Collection<java.lang.Comparable<?>> getSeries()
Description copied from interface:CategoryModelGet all series as a collection.- Specified by:
getSeriesin interfaceCategoryModel
-
getCategory
public java.lang.Comparable<?> getCategory(int index)
Description copied from interface:CategoryModelGet a category of the specified index;- Specified by:
getCategoryin interfaceCategoryModel
-
getCategories
public java.util.Collection<java.lang.Comparable<?>> getCategories()
Description copied from interface:CategoryModelGet categories of a specified series as a collection.- Specified by:
getCategoriesin interfaceCategoryModel
-
getKeys
public java.util.Collection<java.util.List<java.lang.Comparable<?>>> 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
public java.lang.Number getValue(java.lang.Comparable<?> series, java.lang.Comparable<?> category)Description copied from interface:CategoryModelGet value of the specified series and category.- Specified by:
getValuein interfaceCategoryModel- Parameters:
series- the seriescategory- the category.
-
setValue
public void setValue(java.lang.Comparable<?> series, java.lang.Comparable<?> category, java.lang.Number value)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
public void removeValue(java.lang.Comparable<?> series, java.lang.Comparable<?> category)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
public java.lang.Object clone()
- Overrides:
clonein classAbstractChartModel
-
-