root / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / ToolBar.java @ 598
History | View | Annotate | Download (11.6 KB)
1 |
/*
|
---|---|
2 |
* This class was automatically generated with
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
|
4 |
* Schema.
|
5 |
* $Id: ToolBar.java 598 2004-12-22 10:11:38Z fernando $
|
6 |
*/
|
7 |
|
8 |
package com.iver.andami.plugins.config.generate; |
9 |
|
10 |
//---------------------------------/
|
11 |
//- Imported classes and packages -/
|
12 |
//---------------------------------/
|
13 |
|
14 |
import java.io.IOException; |
15 |
import java.io.Reader; |
16 |
import java.io.Serializable; |
17 |
import java.io.Writer; |
18 |
import java.util.Enumeration; |
19 |
import java.util.Vector; |
20 |
import org.exolab.castor.xml.MarshalException; |
21 |
import org.exolab.castor.xml.Marshaller; |
22 |
import org.exolab.castor.xml.Unmarshaller; |
23 |
import org.exolab.castor.xml.ValidationException; |
24 |
import org.xml.sax.ContentHandler; |
25 |
|
26 |
/**
|
27 |
* Class ToolBar.
|
28 |
*
|
29 |
* @version $Revision: 598 $ $Date: 2004-12-22 11:11:38 +0100 (Wed, 22 Dec 2004) $
|
30 |
*/
|
31 |
public class ToolBar implements java.io.Serializable { |
32 |
|
33 |
|
34 |
//--------------------------/
|
35 |
//- Class/Member Variables -/
|
36 |
//--------------------------/
|
37 |
|
38 |
/**
|
39 |
* Field _name
|
40 |
*/
|
41 |
private java.lang.String _name;
|
42 |
|
43 |
/**
|
44 |
* Field _actionToolList
|
45 |
*/
|
46 |
private java.util.Vector _actionToolList;
|
47 |
|
48 |
/**
|
49 |
* Field _selectableToolList
|
50 |
*/
|
51 |
private java.util.Vector _selectableToolList;
|
52 |
|
53 |
|
54 |
//----------------/
|
55 |
//- Constructors -/
|
56 |
//----------------/
|
57 |
|
58 |
public ToolBar() {
|
59 |
super();
|
60 |
_actionToolList = new Vector(); |
61 |
_selectableToolList = new Vector(); |
62 |
} //-- com.iver.andami.plugins.config.generate.ToolBar()
|
63 |
|
64 |
|
65 |
//-----------/
|
66 |
//- Methods -/
|
67 |
//-----------/
|
68 |
|
69 |
/**
|
70 |
* Method addActionTool
|
71 |
*
|
72 |
* @param vActionTool
|
73 |
*/
|
74 |
public void addActionTool(com.iver.andami.plugins.config.generate.ActionTool vActionTool) |
75 |
throws java.lang.IndexOutOfBoundsException
|
76 |
{ |
77 |
_actionToolList.addElement(vActionTool); |
78 |
} //-- void addActionTool(com.iver.andami.plugins.config.generate.ActionTool)
|
79 |
|
80 |
/**
|
81 |
* Method addActionTool
|
82 |
*
|
83 |
* @param index
|
84 |
* @param vActionTool
|
85 |
*/
|
86 |
public void addActionTool(int index, com.iver.andami.plugins.config.generate.ActionTool vActionTool) |
87 |
throws java.lang.IndexOutOfBoundsException
|
88 |
{ |
89 |
_actionToolList.insertElementAt(vActionTool, index); |
90 |
} //-- void addActionTool(int, com.iver.andami.plugins.config.generate.ActionTool)
|
91 |
|
92 |
/**
|
93 |
* Method addSelectableTool
|
94 |
*
|
95 |
* @param vSelectableTool
|
96 |
*/
|
97 |
public void addSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool vSelectableTool) |
98 |
throws java.lang.IndexOutOfBoundsException
|
99 |
{ |
100 |
_selectableToolList.addElement(vSelectableTool); |
101 |
} //-- void addSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool)
|
102 |
|
103 |
/**
|
104 |
* Method addSelectableTool
|
105 |
*
|
106 |
* @param index
|
107 |
* @param vSelectableTool
|
108 |
*/
|
109 |
public void addSelectableTool(int index, com.iver.andami.plugins.config.generate.SelectableTool vSelectableTool) |
110 |
throws java.lang.IndexOutOfBoundsException
|
111 |
{ |
112 |
_selectableToolList.insertElementAt(vSelectableTool, index); |
113 |
} //-- void addSelectableTool(int, com.iver.andami.plugins.config.generate.SelectableTool)
|
114 |
|
115 |
/**
|
116 |
* Method enumerateActionTool
|
117 |
*/
|
118 |
public java.util.Enumeration enumerateActionTool()
|
119 |
{ |
120 |
return _actionToolList.elements();
|
121 |
} //-- java.util.Enumeration enumerateActionTool()
|
122 |
|
123 |
/**
|
124 |
* Method enumerateSelectableTool
|
125 |
*/
|
126 |
public java.util.Enumeration enumerateSelectableTool()
|
127 |
{ |
128 |
return _selectableToolList.elements();
|
129 |
} //-- java.util.Enumeration enumerateSelectableTool()
|
130 |
|
131 |
/**
|
132 |
* Method getActionTool
|
133 |
*
|
134 |
* @param index
|
135 |
*/
|
136 |
public com.iver.andami.plugins.config.generate.ActionTool getActionTool(int index) |
137 |
throws java.lang.IndexOutOfBoundsException
|
138 |
{ |
139 |
//-- check bounds for index
|
140 |
if ((index < 0) || (index > _actionToolList.size())) { |
141 |
throw new IndexOutOfBoundsException(); |
142 |
} |
143 |
|
144 |
return (com.iver.andami.plugins.config.generate.ActionTool) _actionToolList.elementAt(index);
|
145 |
} //-- com.iver.andami.plugins.config.generate.ActionTool getActionTool(int)
|
146 |
|
147 |
/**
|
148 |
* Method getActionTool
|
149 |
*/
|
150 |
public com.iver.andami.plugins.config.generate.ActionTool[] getActionTool() |
151 |
{ |
152 |
int size = _actionToolList.size();
|
153 |
com.iver.andami.plugins.config.generate.ActionTool[] mArray = new com.iver.andami.plugins.config.generate.ActionTool[size]; |
154 |
for (int index = 0; index < size; index++) { |
155 |
mArray[index] = (com.iver.andami.plugins.config.generate.ActionTool) _actionToolList.elementAt(index); |
156 |
} |
157 |
return mArray;
|
158 |
} //-- com.iver.andami.plugins.config.generate.ActionTool[] getActionTool()
|
159 |
|
160 |
/**
|
161 |
* Method getActionToolCount
|
162 |
*/
|
163 |
public int getActionToolCount() |
164 |
{ |
165 |
return _actionToolList.size();
|
166 |
} //-- int getActionToolCount()
|
167 |
|
168 |
/**
|
169 |
* Returns the value of field 'name'.
|
170 |
*
|
171 |
* @return the value of field 'name'.
|
172 |
*/
|
173 |
public java.lang.String getName()
|
174 |
{ |
175 |
return this._name; |
176 |
} //-- java.lang.String getName()
|
177 |
|
178 |
/**
|
179 |
* Method getSelectableTool
|
180 |
*
|
181 |
* @param index
|
182 |
*/
|
183 |
public com.iver.andami.plugins.config.generate.SelectableTool getSelectableTool(int index) |
184 |
throws java.lang.IndexOutOfBoundsException
|
185 |
{ |
186 |
//-- check bounds for index
|
187 |
if ((index < 0) || (index > _selectableToolList.size())) { |
188 |
throw new IndexOutOfBoundsException(); |
189 |
} |
190 |
|
191 |
return (com.iver.andami.plugins.config.generate.SelectableTool) _selectableToolList.elementAt(index);
|
192 |
} //-- com.iver.andami.plugins.config.generate.SelectableTool getSelectableTool(int)
|
193 |
|
194 |
/**
|
195 |
* Method getSelectableTool
|
196 |
*/
|
197 |
public com.iver.andami.plugins.config.generate.SelectableTool[] getSelectableTool() |
198 |
{ |
199 |
int size = _selectableToolList.size();
|
200 |
com.iver.andami.plugins.config.generate.SelectableTool[] mArray = new com.iver.andami.plugins.config.generate.SelectableTool[size]; |
201 |
for (int index = 0; index < size; index++) { |
202 |
mArray[index] = (com.iver.andami.plugins.config.generate.SelectableTool) _selectableToolList.elementAt(index); |
203 |
} |
204 |
return mArray;
|
205 |
} //-- com.iver.andami.plugins.config.generate.SelectableTool[] getSelectableTool()
|
206 |
|
207 |
/**
|
208 |
* Method getSelectableToolCount
|
209 |
*/
|
210 |
public int getSelectableToolCount() |
211 |
{ |
212 |
return _selectableToolList.size();
|
213 |
} //-- int getSelectableToolCount()
|
214 |
|
215 |
/**
|
216 |
* Method isValid
|
217 |
*/
|
218 |
public boolean isValid() |
219 |
{ |
220 |
try {
|
221 |
validate(); |
222 |
} |
223 |
catch (org.exolab.castor.xml.ValidationException vex) {
|
224 |
return false; |
225 |
} |
226 |
return true; |
227 |
} //-- boolean isValid()
|
228 |
|
229 |
/**
|
230 |
* Method marshal
|
231 |
*
|
232 |
* @param out
|
233 |
*/
|
234 |
public void marshal(java.io.Writer out) |
235 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
236 |
{ |
237 |
|
238 |
Marshaller.marshal(this, out);
|
239 |
} //-- void marshal(java.io.Writer)
|
240 |
|
241 |
/**
|
242 |
* Method marshal
|
243 |
*
|
244 |
* @param handler
|
245 |
*/
|
246 |
public void marshal(org.xml.sax.ContentHandler handler) |
247 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
248 |
{ |
249 |
|
250 |
Marshaller.marshal(this, handler);
|
251 |
} //-- void marshal(org.xml.sax.ContentHandler)
|
252 |
|
253 |
/**
|
254 |
* Method removeActionTool
|
255 |
*
|
256 |
* @param index
|
257 |
*/
|
258 |
public com.iver.andami.plugins.config.generate.ActionTool removeActionTool(int index) |
259 |
{ |
260 |
java.lang.Object obj = _actionToolList.elementAt(index); |
261 |
_actionToolList.removeElementAt(index); |
262 |
return (com.iver.andami.plugins.config.generate.ActionTool) obj;
|
263 |
} //-- com.iver.andami.plugins.config.generate.ActionTool removeActionTool(int)
|
264 |
|
265 |
/**
|
266 |
* Method removeAllActionTool
|
267 |
*/
|
268 |
public void removeAllActionTool() |
269 |
{ |
270 |
_actionToolList.removeAllElements(); |
271 |
} //-- void removeAllActionTool()
|
272 |
|
273 |
/**
|
274 |
* Method removeAllSelectableTool
|
275 |
*/
|
276 |
public void removeAllSelectableTool() |
277 |
{ |
278 |
_selectableToolList.removeAllElements(); |
279 |
} //-- void removeAllSelectableTool()
|
280 |
|
281 |
/**
|
282 |
* Method removeSelectableTool
|
283 |
*
|
284 |
* @param index
|
285 |
*/
|
286 |
public com.iver.andami.plugins.config.generate.SelectableTool removeSelectableTool(int index) |
287 |
{ |
288 |
java.lang.Object obj = _selectableToolList.elementAt(index); |
289 |
_selectableToolList.removeElementAt(index); |
290 |
return (com.iver.andami.plugins.config.generate.SelectableTool) obj;
|
291 |
} //-- com.iver.andami.plugins.config.generate.SelectableTool removeSelectableTool(int)
|
292 |
|
293 |
/**
|
294 |
* Method setActionTool
|
295 |
*
|
296 |
* @param index
|
297 |
* @param vActionTool
|
298 |
*/
|
299 |
public void setActionTool(int index, com.iver.andami.plugins.config.generate.ActionTool vActionTool) |
300 |
throws java.lang.IndexOutOfBoundsException
|
301 |
{ |
302 |
//-- check bounds for index
|
303 |
if ((index < 0) || (index > _actionToolList.size())) { |
304 |
throw new IndexOutOfBoundsException(); |
305 |
} |
306 |
_actionToolList.setElementAt(vActionTool, index); |
307 |
} //-- void setActionTool(int, com.iver.andami.plugins.config.generate.ActionTool)
|
308 |
|
309 |
/**
|
310 |
* Method setActionTool
|
311 |
*
|
312 |
* @param actionToolArray
|
313 |
*/
|
314 |
public void setActionTool(com.iver.andami.plugins.config.generate.ActionTool[] actionToolArray) |
315 |
{ |
316 |
//-- copy array
|
317 |
_actionToolList.removeAllElements(); |
318 |
for (int i = 0; i < actionToolArray.length; i++) { |
319 |
_actionToolList.addElement(actionToolArray[i]); |
320 |
} |
321 |
} //-- void setActionTool(com.iver.andami.plugins.config.generate.ActionTool)
|
322 |
|
323 |
/**
|
324 |
* Sets the value of field 'name'.
|
325 |
*
|
326 |
* @param name the value of field 'name'.
|
327 |
*/
|
328 |
public void setName(java.lang.String name) |
329 |
{ |
330 |
this._name = name;
|
331 |
} //-- void setName(java.lang.String)
|
332 |
|
333 |
/**
|
334 |
* Method setSelectableTool
|
335 |
*
|
336 |
* @param index
|
337 |
* @param vSelectableTool
|
338 |
*/
|
339 |
public void setSelectableTool(int index, com.iver.andami.plugins.config.generate.SelectableTool vSelectableTool) |
340 |
throws java.lang.IndexOutOfBoundsException
|
341 |
{ |
342 |
//-- check bounds for index
|
343 |
if ((index < 0) || (index > _selectableToolList.size())) { |
344 |
throw new IndexOutOfBoundsException(); |
345 |
} |
346 |
_selectableToolList.setElementAt(vSelectableTool, index); |
347 |
} //-- void setSelectableTool(int, com.iver.andami.plugins.config.generate.SelectableTool)
|
348 |
|
349 |
/**
|
350 |
* Method setSelectableTool
|
351 |
*
|
352 |
* @param selectableToolArray
|
353 |
*/
|
354 |
public void setSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool[] selectableToolArray) |
355 |
{ |
356 |
//-- copy array
|
357 |
_selectableToolList.removeAllElements(); |
358 |
for (int i = 0; i < selectableToolArray.length; i++) { |
359 |
_selectableToolList.addElement(selectableToolArray[i]); |
360 |
} |
361 |
} //-- void setSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool)
|
362 |
|
363 |
/**
|
364 |
* Method unmarshal
|
365 |
*
|
366 |
* @param reader
|
367 |
*/
|
368 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
369 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
370 |
{ |
371 |
return (com.iver.andami.plugins.config.generate.ToolBar) Unmarshaller.unmarshal(com.iver.andami.plugins.config.generate.ToolBar.class, reader);
|
372 |
} //-- java.lang.Object unmarshal(java.io.Reader)
|
373 |
|
374 |
/**
|
375 |
* Method validate
|
376 |
*/
|
377 |
public void validate() |
378 |
throws org.exolab.castor.xml.ValidationException
|
379 |
{ |
380 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
|
381 |
validator.validate(this);
|
382 |
} //-- void validate()
|
383 |
|
384 |
} |