root / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / SkinExtensionType.java @ 598
History | View | Annotate | Download (10.7 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: SkinExtensionType.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 SkinExtensionType.
|
28 |
*
|
29 |
* @version $Revision: 598 $ $Date: 2004-12-22 11:11:38 +0100 (Wed, 22 Dec 2004) $
|
30 |
*/
|
31 |
public class SkinExtensionType implements java.io.Serializable { |
32 |
|
33 |
|
34 |
//--------------------------/
|
35 |
//- Class/Member Variables -/
|
36 |
//--------------------------/
|
37 |
|
38 |
/**
|
39 |
* Field _className
|
40 |
*/
|
41 |
private java.lang.String _className;
|
42 |
|
43 |
/**
|
44 |
* Field _menuList
|
45 |
*/
|
46 |
private java.util.Vector _menuList;
|
47 |
|
48 |
/**
|
49 |
* Field _toolBarList
|
50 |
*/
|
51 |
private java.util.Vector _toolBarList;
|
52 |
|
53 |
|
54 |
//----------------/
|
55 |
//- Constructors -/
|
56 |
//----------------/
|
57 |
|
58 |
public SkinExtensionType() {
|
59 |
super();
|
60 |
_menuList = new Vector(); |
61 |
_toolBarList = new Vector(); |
62 |
} //-- com.iver.andami.plugins.config.generate.SkinExtensionType()
|
63 |
|
64 |
|
65 |
//-----------/
|
66 |
//- Methods -/
|
67 |
//-----------/
|
68 |
|
69 |
/**
|
70 |
* Method addMenu
|
71 |
*
|
72 |
* @param vMenu
|
73 |
*/
|
74 |
public void addMenu(com.iver.andami.plugins.config.generate.Menu vMenu) |
75 |
throws java.lang.IndexOutOfBoundsException
|
76 |
{ |
77 |
_menuList.addElement(vMenu); |
78 |
} //-- void addMenu(com.iver.andami.plugins.config.generate.Menu)
|
79 |
|
80 |
/**
|
81 |
* Method addMenu
|
82 |
*
|
83 |
* @param index
|
84 |
* @param vMenu
|
85 |
*/
|
86 |
public void addMenu(int index, com.iver.andami.plugins.config.generate.Menu vMenu) |
87 |
throws java.lang.IndexOutOfBoundsException
|
88 |
{ |
89 |
_menuList.insertElementAt(vMenu, index); |
90 |
} //-- void addMenu(int, com.iver.andami.plugins.config.generate.Menu)
|
91 |
|
92 |
/**
|
93 |
* Method addToolBar
|
94 |
*
|
95 |
* @param vToolBar
|
96 |
*/
|
97 |
public void addToolBar(com.iver.andami.plugins.config.generate.ToolBar vToolBar) |
98 |
throws java.lang.IndexOutOfBoundsException
|
99 |
{ |
100 |
_toolBarList.addElement(vToolBar); |
101 |
} //-- void addToolBar(com.iver.andami.plugins.config.generate.ToolBar)
|
102 |
|
103 |
/**
|
104 |
* Method addToolBar
|
105 |
*
|
106 |
* @param index
|
107 |
* @param vToolBar
|
108 |
*/
|
109 |
public void addToolBar(int index, com.iver.andami.plugins.config.generate.ToolBar vToolBar) |
110 |
throws java.lang.IndexOutOfBoundsException
|
111 |
{ |
112 |
_toolBarList.insertElementAt(vToolBar, index); |
113 |
} //-- void addToolBar(int, com.iver.andami.plugins.config.generate.ToolBar)
|
114 |
|
115 |
/**
|
116 |
* Method enumerateMenu
|
117 |
*/
|
118 |
public java.util.Enumeration enumerateMenu()
|
119 |
{ |
120 |
return _menuList.elements();
|
121 |
} //-- java.util.Enumeration enumerateMenu()
|
122 |
|
123 |
/**
|
124 |
* Method enumerateToolBar
|
125 |
*/
|
126 |
public java.util.Enumeration enumerateToolBar()
|
127 |
{ |
128 |
return _toolBarList.elements();
|
129 |
} //-- java.util.Enumeration enumerateToolBar()
|
130 |
|
131 |
/**
|
132 |
* Returns the value of field 'className'.
|
133 |
*
|
134 |
* @return the value of field 'className'.
|
135 |
*/
|
136 |
public java.lang.String getClassName()
|
137 |
{ |
138 |
return this._className; |
139 |
} //-- java.lang.String getClassName()
|
140 |
|
141 |
/**
|
142 |
* Method getMenu
|
143 |
*
|
144 |
* @param index
|
145 |
*/
|
146 |
public com.iver.andami.plugins.config.generate.Menu getMenu(int index) |
147 |
throws java.lang.IndexOutOfBoundsException
|
148 |
{ |
149 |
//-- check bounds for index
|
150 |
if ((index < 0) || (index > _menuList.size())) { |
151 |
throw new IndexOutOfBoundsException(); |
152 |
} |
153 |
|
154 |
return (com.iver.andami.plugins.config.generate.Menu) _menuList.elementAt(index);
|
155 |
} //-- com.iver.andami.plugins.config.generate.Menu getMenu(int)
|
156 |
|
157 |
/**
|
158 |
* Method getMenu
|
159 |
*/
|
160 |
public com.iver.andami.plugins.config.generate.Menu[] getMenu() |
161 |
{ |
162 |
int size = _menuList.size();
|
163 |
com.iver.andami.plugins.config.generate.Menu[] mArray = new com.iver.andami.plugins.config.generate.Menu[size]; |
164 |
for (int index = 0; index < size; index++) { |
165 |
mArray[index] = (com.iver.andami.plugins.config.generate.Menu) _menuList.elementAt(index); |
166 |
} |
167 |
return mArray;
|
168 |
} //-- com.iver.andami.plugins.config.generate.Menu[] getMenu()
|
169 |
|
170 |
/**
|
171 |
* Method getMenuCount
|
172 |
*/
|
173 |
public int getMenuCount() |
174 |
{ |
175 |
return _menuList.size();
|
176 |
} //-- int getMenuCount()
|
177 |
|
178 |
/**
|
179 |
* Method getToolBar
|
180 |
*
|
181 |
* @param index
|
182 |
*/
|
183 |
public com.iver.andami.plugins.config.generate.ToolBar getToolBar(int index) |
184 |
throws java.lang.IndexOutOfBoundsException
|
185 |
{ |
186 |
//-- check bounds for index
|
187 |
if ((index < 0) || (index > _toolBarList.size())) { |
188 |
throw new IndexOutOfBoundsException(); |
189 |
} |
190 |
|
191 |
return (com.iver.andami.plugins.config.generate.ToolBar) _toolBarList.elementAt(index);
|
192 |
} //-- com.iver.andami.plugins.config.generate.ToolBar getToolBar(int)
|
193 |
|
194 |
/**
|
195 |
* Method getToolBar
|
196 |
*/
|
197 |
public com.iver.andami.plugins.config.generate.ToolBar[] getToolBar() |
198 |
{ |
199 |
int size = _toolBarList.size();
|
200 |
com.iver.andami.plugins.config.generate.ToolBar[] mArray = new com.iver.andami.plugins.config.generate.ToolBar[size]; |
201 |
for (int index = 0; index < size; index++) { |
202 |
mArray[index] = (com.iver.andami.plugins.config.generate.ToolBar) _toolBarList.elementAt(index); |
203 |
} |
204 |
return mArray;
|
205 |
} //-- com.iver.andami.plugins.config.generate.ToolBar[] getToolBar()
|
206 |
|
207 |
/**
|
208 |
* Method getToolBarCount
|
209 |
*/
|
210 |
public int getToolBarCount() |
211 |
{ |
212 |
return _toolBarList.size();
|
213 |
} //-- int getToolBarCount()
|
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 removeAllMenu
|
255 |
*/
|
256 |
public void removeAllMenu() |
257 |
{ |
258 |
_menuList.removeAllElements(); |
259 |
} //-- void removeAllMenu()
|
260 |
|
261 |
/**
|
262 |
* Method removeAllToolBar
|
263 |
*/
|
264 |
public void removeAllToolBar() |
265 |
{ |
266 |
_toolBarList.removeAllElements(); |
267 |
} //-- void removeAllToolBar()
|
268 |
|
269 |
/**
|
270 |
* Method removeMenu
|
271 |
*
|
272 |
* @param index
|
273 |
*/
|
274 |
public com.iver.andami.plugins.config.generate.Menu removeMenu(int index) |
275 |
{ |
276 |
java.lang.Object obj = _menuList.elementAt(index); |
277 |
_menuList.removeElementAt(index); |
278 |
return (com.iver.andami.plugins.config.generate.Menu) obj;
|
279 |
} //-- com.iver.andami.plugins.config.generate.Menu removeMenu(int)
|
280 |
|
281 |
/**
|
282 |
* Method removeToolBar
|
283 |
*
|
284 |
* @param index
|
285 |
*/
|
286 |
public com.iver.andami.plugins.config.generate.ToolBar removeToolBar(int index) |
287 |
{ |
288 |
java.lang.Object obj = _toolBarList.elementAt(index); |
289 |
_toolBarList.removeElementAt(index); |
290 |
return (com.iver.andami.plugins.config.generate.ToolBar) obj;
|
291 |
} //-- com.iver.andami.plugins.config.generate.ToolBar removeToolBar(int)
|
292 |
|
293 |
/**
|
294 |
* Sets the value of field 'className'.
|
295 |
*
|
296 |
* @param className the value of field 'className'.
|
297 |
*/
|
298 |
public void setClassName(java.lang.String className) |
299 |
{ |
300 |
this._className = className;
|
301 |
} //-- void setClassName(java.lang.String)
|
302 |
|
303 |
/**
|
304 |
* Method setMenu
|
305 |
*
|
306 |
* @param index
|
307 |
* @param vMenu
|
308 |
*/
|
309 |
public void setMenu(int index, com.iver.andami.plugins.config.generate.Menu vMenu) |
310 |
throws java.lang.IndexOutOfBoundsException
|
311 |
{ |
312 |
//-- check bounds for index
|
313 |
if ((index < 0) || (index > _menuList.size())) { |
314 |
throw new IndexOutOfBoundsException(); |
315 |
} |
316 |
_menuList.setElementAt(vMenu, index); |
317 |
} //-- void setMenu(int, com.iver.andami.plugins.config.generate.Menu)
|
318 |
|
319 |
/**
|
320 |
* Method setMenu
|
321 |
*
|
322 |
* @param menuArray
|
323 |
*/
|
324 |
public void setMenu(com.iver.andami.plugins.config.generate.Menu[] menuArray) |
325 |
{ |
326 |
//-- copy array
|
327 |
_menuList.removeAllElements(); |
328 |
for (int i = 0; i < menuArray.length; i++) { |
329 |
_menuList.addElement(menuArray[i]); |
330 |
} |
331 |
} //-- void setMenu(com.iver.andami.plugins.config.generate.Menu)
|
332 |
|
333 |
/**
|
334 |
* Method setToolBar
|
335 |
*
|
336 |
* @param index
|
337 |
* @param vToolBar
|
338 |
*/
|
339 |
public void setToolBar(int index, com.iver.andami.plugins.config.generate.ToolBar vToolBar) |
340 |
throws java.lang.IndexOutOfBoundsException
|
341 |
{ |
342 |
//-- check bounds for index
|
343 |
if ((index < 0) || (index > _toolBarList.size())) { |
344 |
throw new IndexOutOfBoundsException(); |
345 |
} |
346 |
_toolBarList.setElementAt(vToolBar, index); |
347 |
} //-- void setToolBar(int, com.iver.andami.plugins.config.generate.ToolBar)
|
348 |
|
349 |
/**
|
350 |
* Method setToolBar
|
351 |
*
|
352 |
* @param toolBarArray
|
353 |
*/
|
354 |
public void setToolBar(com.iver.andami.plugins.config.generate.ToolBar[] toolBarArray) |
355 |
{ |
356 |
//-- copy array
|
357 |
_toolBarList.removeAllElements(); |
358 |
for (int i = 0; i < toolBarArray.length; i++) { |
359 |
_toolBarList.addElement(toolBarArray[i]); |
360 |
} |
361 |
} //-- void setToolBar(com.iver.andami.plugins.config.generate.ToolBar)
|
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.SkinExtensionType) Unmarshaller.unmarshal(com.iver.andami.plugins.config.generate.SkinExtensionType.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 |
} |