root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / persistence / generate / ToolBars.java @ 29593
History | View | Annotate | Download (7.4 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: ToolBars.java 29593 2009-06-29 15:54:31Z jpiera $
|
6 |
*/
|
7 |
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
9 |
*
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
11 |
*
|
12 |
* This program is free software; you can redistribute it and/or
|
13 |
* modify it under the terms of the GNU General Public License
|
14 |
* as published by the Free Software Foundation; either version 2
|
15 |
* of the License, or (at your option) any later version.
|
16 |
*
|
17 |
* This program is distributed in the hope that it will be useful,
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
* GNU General Public License for more details.
|
21 |
*
|
22 |
* You should have received a copy of the GNU General Public License
|
23 |
* along with this program; if not, write to the Free Software
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
25 |
*
|
26 |
* For more information, contact:
|
27 |
*
|
28 |
* Generalitat Valenciana
|
29 |
* Conselleria d'Infraestructures i Transport
|
30 |
* Av. Blasco Ib??ez, 50
|
31 |
* 46010 VALENCIA
|
32 |
* SPAIN
|
33 |
*
|
34 |
* +34 963862235
|
35 |
* gvsig@gva.es
|
36 |
* www.gvsig.gva.es
|
37 |
*
|
38 |
* or
|
39 |
*
|
40 |
* IVER T.I. S.A
|
41 |
* Salamanca 50
|
42 |
* 46005 Valencia
|
43 |
* Spain
|
44 |
*
|
45 |
* +34 963163400
|
46 |
* dac@iver.es
|
47 |
*/
|
48 |
package org.gvsig.andami.persistence.generate; |
49 |
|
50 |
//---------------------------------/
|
51 |
//- Imported classes and packages -/
|
52 |
//---------------------------------/
|
53 |
|
54 |
import java.util.Vector; |
55 |
|
56 |
import org.exolab.castor.xml.Marshaller; |
57 |
import org.exolab.castor.xml.Unmarshaller; |
58 |
|
59 |
/**
|
60 |
* Class ToolBars.
|
61 |
*
|
62 |
* @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (Mon, 29 Jun 2009) $
|
63 |
*/
|
64 |
public class ToolBars implements java.io.Serializable { |
65 |
|
66 |
|
67 |
//--------------------------/
|
68 |
//- Class/Member Variables -/
|
69 |
//--------------------------/
|
70 |
|
71 |
/**
|
72 |
* Field _toolBarList
|
73 |
*/
|
74 |
private java.util.Vector _toolBarList;
|
75 |
|
76 |
|
77 |
//----------------/
|
78 |
//- Constructors -/
|
79 |
//----------------/
|
80 |
|
81 |
public ToolBars() {
|
82 |
super();
|
83 |
_toolBarList = new Vector(); |
84 |
} //-- com.iver.andami.persistence.generate.ToolBars()
|
85 |
|
86 |
|
87 |
//-----------/
|
88 |
//- Methods -/
|
89 |
//-----------/
|
90 |
|
91 |
/**
|
92 |
* Method addToolBar
|
93 |
*
|
94 |
* @param vToolBar
|
95 |
*/
|
96 |
public void addToolBar(org.gvsig.andami.persistence.generate.ToolBar vToolBar) |
97 |
throws java.lang.IndexOutOfBoundsException
|
98 |
{ |
99 |
_toolBarList.addElement(vToolBar); |
100 |
} //-- void addToolBar(com.iver.andami.persistence.generate.ToolBar)
|
101 |
|
102 |
/**
|
103 |
* Method addToolBar
|
104 |
*
|
105 |
* @param index
|
106 |
* @param vToolBar
|
107 |
*/
|
108 |
public void addToolBar(int index, org.gvsig.andami.persistence.generate.ToolBar vToolBar) |
109 |
throws java.lang.IndexOutOfBoundsException
|
110 |
{ |
111 |
_toolBarList.insertElementAt(vToolBar, index); |
112 |
} //-- void addToolBar(int, com.iver.andami.persistence.generate.ToolBar)
|
113 |
|
114 |
/**
|
115 |
* Method enumerateToolBar
|
116 |
*/
|
117 |
public java.util.Enumeration enumerateToolBar()
|
118 |
{ |
119 |
return _toolBarList.elements();
|
120 |
} //-- java.util.Enumeration enumerateToolBar()
|
121 |
|
122 |
/**
|
123 |
* Method getToolBar
|
124 |
*
|
125 |
* @param index
|
126 |
*/
|
127 |
public org.gvsig.andami.persistence.generate.ToolBar getToolBar(int index) |
128 |
throws java.lang.IndexOutOfBoundsException
|
129 |
{ |
130 |
//-- check bounds for index
|
131 |
if ((index < 0) || (index > _toolBarList.size())) { |
132 |
throw new IndexOutOfBoundsException(); |
133 |
} |
134 |
|
135 |
return (org.gvsig.andami.persistence.generate.ToolBar) _toolBarList.elementAt(index);
|
136 |
} //-- com.iver.andami.persistence.generate.ToolBar getToolBar(int)
|
137 |
|
138 |
/**
|
139 |
* Method getToolBar
|
140 |
*/
|
141 |
public org.gvsig.andami.persistence.generate.ToolBar[] getToolBar() |
142 |
{ |
143 |
int size = _toolBarList.size();
|
144 |
org.gvsig.andami.persistence.generate.ToolBar[] mArray = new org.gvsig.andami.persistence.generate.ToolBar[size]; |
145 |
for (int index = 0; index < size; index++) { |
146 |
mArray[index] = (org.gvsig.andami.persistence.generate.ToolBar) _toolBarList.elementAt(index); |
147 |
} |
148 |
return mArray;
|
149 |
} //-- com.iver.andami.persistence.generate.ToolBar[] getToolBar()
|
150 |
|
151 |
/**
|
152 |
* Method getToolBarCount
|
153 |
*/
|
154 |
public int getToolBarCount() |
155 |
{ |
156 |
return _toolBarList.size();
|
157 |
} //-- int getToolBarCount()
|
158 |
|
159 |
/**
|
160 |
* Method isValid
|
161 |
*/
|
162 |
public boolean isValid() |
163 |
{ |
164 |
try {
|
165 |
validate(); |
166 |
} |
167 |
catch (org.exolab.castor.xml.ValidationException vex) {
|
168 |
return false; |
169 |
} |
170 |
return true; |
171 |
} //-- boolean isValid()
|
172 |
|
173 |
/**
|
174 |
* Method marshal
|
175 |
*
|
176 |
* @param out
|
177 |
*/
|
178 |
public void marshal(java.io.Writer out) |
179 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
180 |
{ |
181 |
|
182 |
Marshaller.marshal(this, out);
|
183 |
} //-- void marshal(java.io.Writer)
|
184 |
|
185 |
/**
|
186 |
* Method marshal
|
187 |
*
|
188 |
* @param handler
|
189 |
*/
|
190 |
public void marshal(org.xml.sax.ContentHandler handler) |
191 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
192 |
{ |
193 |
|
194 |
Marshaller.marshal(this, handler);
|
195 |
} //-- void marshal(org.xml.sax.ContentHandler)
|
196 |
|
197 |
/**
|
198 |
* Method removeAllToolBar
|
199 |
*/
|
200 |
public void removeAllToolBar() |
201 |
{ |
202 |
_toolBarList.removeAllElements(); |
203 |
} //-- void removeAllToolBar()
|
204 |
|
205 |
/**
|
206 |
* Method removeToolBar
|
207 |
*
|
208 |
* @param index
|
209 |
*/
|
210 |
public org.gvsig.andami.persistence.generate.ToolBar removeToolBar(int index) |
211 |
{ |
212 |
java.lang.Object obj = _toolBarList.elementAt(index); |
213 |
_toolBarList.removeElementAt(index); |
214 |
return (org.gvsig.andami.persistence.generate.ToolBar) obj;
|
215 |
} //-- com.iver.andami.persistence.generate.ToolBar removeToolBar(int)
|
216 |
|
217 |
/**
|
218 |
* Method setToolBar
|
219 |
*
|
220 |
* @param index
|
221 |
* @param vToolBar
|
222 |
*/
|
223 |
public void setToolBar(int index, org.gvsig.andami.persistence.generate.ToolBar vToolBar) |
224 |
throws java.lang.IndexOutOfBoundsException
|
225 |
{ |
226 |
//-- check bounds for index
|
227 |
if ((index < 0) || (index > _toolBarList.size())) { |
228 |
throw new IndexOutOfBoundsException(); |
229 |
} |
230 |
_toolBarList.setElementAt(vToolBar, index); |
231 |
} //-- void setToolBar(int, com.iver.andami.persistence.generate.ToolBar)
|
232 |
|
233 |
/**
|
234 |
* Method setToolBar
|
235 |
*
|
236 |
* @param toolBarArray
|
237 |
*/
|
238 |
public void setToolBar(org.gvsig.andami.persistence.generate.ToolBar[] toolBarArray) |
239 |
{ |
240 |
//-- copy array
|
241 |
_toolBarList.removeAllElements(); |
242 |
for (int i = 0; i < toolBarArray.length; i++) { |
243 |
_toolBarList.addElement(toolBarArray[i]); |
244 |
} |
245 |
} //-- void setToolBar(com.iver.andami.persistence.generate.ToolBar)
|
246 |
|
247 |
/**
|
248 |
* Method unmarshal
|
249 |
*
|
250 |
* @param reader
|
251 |
*/
|
252 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
253 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
254 |
{ |
255 |
return (org.gvsig.andami.persistence.generate.ToolBars) Unmarshaller.unmarshal(org.gvsig.andami.persistence.generate.ToolBars.class, reader);
|
256 |
} //-- java.lang.Object unmarshal(java.io.Reader)
|
257 |
|
258 |
/**
|
259 |
* Method validate
|
260 |
*/
|
261 |
public void validate() |
262 |
throws org.exolab.castor.xml.ValidationException
|
263 |
{ |
264 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
|
265 |
validator.validate(this);
|
266 |
} //-- void validate()
|
267 |
|
268 |
} |