org.zkoss.zkmax.zul.fusionchart.config
Class CategoriesPropertiesMap

java.lang.Object
  extended by org.zkoss.zkmax.zul.fusionchart.config.DefaultChartProperties
      extended by org.zkoss.zkmax.zul.fusionchart.config.ChartPropertiesMap
          extended by org.zkoss.zkmax.zul.fusionchart.config.CategoriesPropertiesMap
All Implemented Interfaces:
java.io.Serializable, ChartProperties, ChartInfoNotifier

public class CategoriesPropertiesMap
extends ChartPropertiesMap

Since:
6.0.1
Author:
jimmy/tony
See Also:
Serialized Form

Constructor Summary
CategoriesPropertiesMap()
           
 
Method Summary
 void clearAllCategoryProperties()
          Remove all of category properties.
 ChartProperties createCategoryProperties(java.lang.Comparable category)
          Create the category properties by category name.
 ChartProperties createCategoryProperties(int index)
          Create the category properties in the specified position.
 ChartProperties getCategoryProperties(java.lang.Comparable category)
          Returns the category properties.
 ChartProperties getCategoryProperties(int index)
          Returns the category properties in the specified position.
 void removeCategoryProperties(java.lang.Comparable category)
          Remove the category properties.
 void removeCategoryProperties(int index)
          Remove the category properties in the specified position.
 
Methods inherited from class org.zkoss.zkmax.zul.fusionchart.config.ChartPropertiesMap
clearAllProperties, createProperties, getKeys, getProperties, removeProperties, size
 
Methods inherited from class org.zkoss.zkmax.zul.fusionchart.config.DefaultChartProperties
addAllProperties, addChartDataListener, addProperty, addPropertyListener, clear, fireEvent, fireEvent, getAllProperties, getProperty, removeChartDataListener, removeProperty, removePropertyListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoriesPropertiesMap

public CategoriesPropertiesMap()
Method Detail

createCategoryProperties

public ChartProperties createCategoryProperties(java.lang.Comparable category)
Create the category properties by category name. The category should fit the name from the model or it takes no effect. Ex. If you have the code in your model:
 PieModel piemodel = new SimplePieModel();
 piemodel.setValue("C/C++", new Double(12.5)); //Category is "C/C++" 
 
Then you want to config the color of the "C/C++" category, you could invoke the
 
        categoriesPropertiesMap.createCategoryProperties("C/C++").addProperty(CategoriesPropertiesMap.COLOR, "AFD8F8");
 

Parameters:
category -
Returns:
ChartProperties

createCategoryProperties

public ChartProperties createCategoryProperties(int index)
Create the category properties in the specified position. Ex. If you have the code in your model:
 PieModel piemodel = new SimplePieModel();
 piemodel.setValue("C/C++", new Double(12.5)); //Category 0 is "C/C++"
 piemodel.setValue("Java", new Double(13.5)); //Category 1 is "C/C++"
 piemodel.setValue("VB", new Double(5.5)); //Category 2 is "VB"  
 
Then you want to set the color of the "C/C++" (index:0) category, you could invoke the
 categoriesPropertiesMap.createCategoryProperties(0).addProperty(CategoriesPropertiesMap.COLOR, "AFD8F8"); 
Note:If you invoke both the createCategoryProperties(Comparable) and createCategoryProperties(int) for same category, it will only apply the createCategoryProperties(int) one.

Parameters:
index - the index of category , mapping to the index of the model.
Returns:
ChartProperties The current properties.

getCategoryProperties

public ChartProperties getCategoryProperties(java.lang.Comparable category)
Returns the category properties.

Parameters:
category -
Returns:
ChartProperties

getCategoryProperties

public ChartProperties getCategoryProperties(int index)
Returns the category properties in the specified position.

Parameters:
index -
Returns:
ChartProperties

removeCategoryProperties

public void removeCategoryProperties(java.lang.Comparable category)
Remove the category properties.

Parameters:
category -

removeCategoryProperties

public void removeCategoryProperties(int index)
Remove the category properties in the specified position.

Parameters:
index -

clearAllCategoryProperties

public void clearAllCategoryProperties()
Remove all of category properties.



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo