KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > catedit > CategorySupport


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.catedit;
14
15 import java.util.ArrayList JavaDoc;
16 import java.util.List JavaDoc;
17
18 /**
19  * Created on 09.12.2002
20  *
21  * @author av
22  */

23 public class CategorySupport implements Category {
24   List JavaDoc items = new ArrayList JavaDoc();
25   String JavaDoc name;
26   String JavaDoc icon;
27   boolean orderSignificant;
28   boolean emptyAllowed;
29   
30   /**
31    * Constructor for CategorySupport.
32    */

33   public CategorySupport(String JavaDoc name, String JavaDoc icon) {
34     this.name = name;
35     this.icon = icon;
36   }
37
38
39   /**
40    * Returns the icon.
41    * @return String
42    */

43   public String JavaDoc getIcon() {
44     return icon;
45   }
46
47   /**
48    * Returns the items.
49    * @return List
50    */

51   public List JavaDoc getItems() {
52     return items;
53   }
54
55   /**
56    * Returns the name.
57    * @return String
58    */

59   public String JavaDoc getName() {
60     return name;
61   }
62
63   /**
64    * Sets the icon.
65    * @param icon The icon to set
66    */

67   public void setIcon(String JavaDoc icon) {
68     this.icon = icon;
69   }
70
71   /**
72    * Sets the items.
73    * @param items The items to set
74    */

75   public void setItems(List JavaDoc items) {
76     this.items = items;
77   }
78
79   /**
80    * Sets the name.
81    * @param name The name to set
82    */

83   public void setName(String JavaDoc name) {
84     this.name = name;
85   }
86
87   /**
88    * Returns the orderSignificant.
89    * @return boolean
90    */

91   public boolean isOrderSignificant() {
92     return orderSignificant;
93   }
94
95   /**
96    * Sets the orderSignificant.
97    * @param orderSignificant The orderSignificant to set
98    */

99   public void setOrderSignificant(boolean orderSignificant) {
100     this.orderSignificant = orderSignificant;
101   }
102
103   /**
104    * Returns the emptyAllowed.
105    * @return boolean
106    */

107   public boolean isEmptyAllowed() {
108     return emptyAllowed;
109   }
110
111   /**
112    * Sets the emptyAllowed.
113    * @param emptyAllowed The emptyAllowed to set
114    */

115   public void setEmptyAllowed(boolean emptyAllowed) {
116     this.emptyAllowed = emptyAllowed;
117   }
118
119   /**
120    * @see com.tonbeller.wcf.catedit.Category#addItem(Item)
121    */

122   public void addItem(Item item) {
123     items.add(item);
124   }
125
126   /**
127    * @see com.tonbeller.wcf.catedit.Category#changeOrder(List)
128    */

129   public void changeOrder(List JavaDoc items) {
130     this.items = items;
131   }
132
133   /**
134    * @see com.tonbeller.wcf.catedit.Category#removeItem(Item)
135    */

136   public void removeItem(Item item) {
137     items.remove(item);
138   }
139
140 }
141
Popular Tags