01: /* PieModel.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Thu Aug 14 10:20:14 2006, Created by henrichen
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zul;
20:
21: import java.util.Collection;
22:
23: /**
24: * A Pie chart data model.
25: *
26: * @author henrichen
27: * @see Chart
28: * @see SimplePieModel
29: */
30: public interface PieModel extends ChartModel {
31: /**
32: * Get category of the specified index (0 based).
33: * @param index the index of the category.
34: */
35: public Comparable getCategory(int index);
36:
37: /**
38: * Get categories as a collection.
39: */
40: public Collection getCategories();
41:
42: /**
43: * Get value of the specified category.
44: * @param category the pie category.
45: */
46: public Number getValue(Comparable category);
47:
48: /**
49: * add or update the value of a specified category.
50: * @param category the pie category.
51: * @param value the pie value.
52: */
53: public void setValue(Comparable category, Number value);
54:
55: /**
56: * remove the value of the specified category.
57: * @param category the pie category.
58: */
59: public void removeValue(Comparable category);
60:
61: /**
62: * clear the model.
63: */
64: public void clear();
65: }
|