svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.framework / org.gvsig.andami / src / main / java / org / gvsig / andami / persistence / generate / ToolBars.java @ 40596
History | View | Annotate | Download (7.25 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
/*
|
25 |
* This class was automatically generated with
|
26 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
|
27 |
* Schema.
|
28 |
* $Id: ToolBars.java 29593 2009-06-29 15:54:31Z jpiera $
|
29 |
*/
|
30 |
|
31 |
package org.gvsig.andami.persistence.generate; |
32 |
|
33 |
//---------------------------------/
|
34 |
//- Imported classes and packages -/
|
35 |
//---------------------------------/
|
36 |
|
37 |
import java.util.Vector; |
38 |
|
39 |
import org.exolab.castor.xml.Marshaller; |
40 |
import org.exolab.castor.xml.Unmarshaller; |
41 |
|
42 |
/**
|
43 |
* Class ToolBars.
|
44 |
*
|
45 |
* @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (lun, 29 jun 2009) $
|
46 |
*/
|
47 |
public class ToolBars implements java.io.Serializable { |
48 |
|
49 |
|
50 |
//--------------------------/
|
51 |
//- Class/Member Variables -/
|
52 |
//--------------------------/
|
53 |
|
54 |
/**
|
55 |
* Field _toolBarList
|
56 |
*/
|
57 |
private java.util.Vector _toolBarList;
|
58 |
|
59 |
|
60 |
//----------------/
|
61 |
//- Constructors -/
|
62 |
//----------------/
|
63 |
|
64 |
public ToolBars() {
|
65 |
super();
|
66 |
_toolBarList = new Vector(); |
67 |
} //-- com.iver.andami.persistence.generate.ToolBars()
|
68 |
|
69 |
|
70 |
//-----------/
|
71 |
//- Methods -/
|
72 |
//-----------/
|
73 |
|
74 |
/**
|
75 |
* Method addToolBar
|
76 |
*
|
77 |
* @param vToolBar
|
78 |
*/
|
79 |
public void addToolBar(org.gvsig.andami.persistence.generate.ToolBar vToolBar) |
80 |
throws java.lang.IndexOutOfBoundsException
|
81 |
{ |
82 |
_toolBarList.addElement(vToolBar); |
83 |
} //-- void addToolBar(com.iver.andami.persistence.generate.ToolBar)
|
84 |
|
85 |
/**
|
86 |
* Method addToolBar
|
87 |
*
|
88 |
* @param index
|
89 |
* @param vToolBar
|
90 |
*/
|
91 |
public void addToolBar(int index, org.gvsig.andami.persistence.generate.ToolBar vToolBar) |
92 |
throws java.lang.IndexOutOfBoundsException
|
93 |
{ |
94 |
_toolBarList.insertElementAt(vToolBar, index); |
95 |
} //-- void addToolBar(int, com.iver.andami.persistence.generate.ToolBar)
|
96 |
|
97 |
/**
|
98 |
* Method enumerateToolBar
|
99 |
*/
|
100 |
public java.util.Enumeration enumerateToolBar()
|
101 |
{ |
102 |
return _toolBarList.elements();
|
103 |
} //-- java.util.Enumeration enumerateToolBar()
|
104 |
|
105 |
/**
|
106 |
* Method getToolBar
|
107 |
*
|
108 |
* @param index
|
109 |
*/
|
110 |
public org.gvsig.andami.persistence.generate.ToolBar getToolBar(int index) |
111 |
throws java.lang.IndexOutOfBoundsException
|
112 |
{ |
113 |
//-- check bounds for index
|
114 |
if ((index < 0) || (index > _toolBarList.size())) { |
115 |
throw new IndexOutOfBoundsException(); |
116 |
} |
117 |
|
118 |
return (org.gvsig.andami.persistence.generate.ToolBar) _toolBarList.elementAt(index);
|
119 |
} //-- com.iver.andami.persistence.generate.ToolBar getToolBar(int)
|
120 |
|
121 |
/**
|
122 |
* Method getToolBar
|
123 |
*/
|
124 |
public org.gvsig.andami.persistence.generate.ToolBar[] getToolBar() |
125 |
{ |
126 |
int size = _toolBarList.size();
|
127 |
org.gvsig.andami.persistence.generate.ToolBar[] mArray = new org.gvsig.andami.persistence.generate.ToolBar[size]; |
128 |
for (int index = 0; index < size; index++) { |
129 |
mArray[index] = (org.gvsig.andami.persistence.generate.ToolBar) _toolBarList.elementAt(index); |
130 |
} |
131 |
return mArray;
|
132 |
} //-- com.iver.andami.persistence.generate.ToolBar[] getToolBar()
|
133 |
|
134 |
/**
|
135 |
* Method getToolBarCount
|
136 |
*/
|
137 |
public int getToolBarCount() |
138 |
{ |
139 |
return _toolBarList.size();
|
140 |
} //-- int getToolBarCount()
|
141 |
|
142 |
/**
|
143 |
* Method isValid
|
144 |
*/
|
145 |
public boolean isValid() |
146 |
{ |
147 |
try {
|
148 |
validate(); |
149 |
} |
150 |
catch (org.exolab.castor.xml.ValidationException vex) {
|
151 |
return false; |
152 |
} |
153 |
return true; |
154 |
} //-- boolean isValid()
|
155 |
|
156 |
/**
|
157 |
* Method marshal
|
158 |
*
|
159 |
* @param out
|
160 |
*/
|
161 |
public void marshal(java.io.Writer out) |
162 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
163 |
{ |
164 |
|
165 |
Marshaller.marshal(this, out);
|
166 |
} //-- void marshal(java.io.Writer)
|
167 |
|
168 |
/**
|
169 |
* Method marshal
|
170 |
*
|
171 |
* @param handler
|
172 |
*/
|
173 |
public void marshal(org.xml.sax.ContentHandler handler) |
174 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
175 |
{ |
176 |
|
177 |
Marshaller.marshal(this, handler);
|
178 |
} //-- void marshal(org.xml.sax.ContentHandler)
|
179 |
|
180 |
/**
|
181 |
* Method removeAllToolBar
|
182 |
*/
|
183 |
public void removeAllToolBar() |
184 |
{ |
185 |
_toolBarList.removeAllElements(); |
186 |
} //-- void removeAllToolBar()
|
187 |
|
188 |
/**
|
189 |
* Method removeToolBar
|
190 |
*
|
191 |
* @param index
|
192 |
*/
|
193 |
public org.gvsig.andami.persistence.generate.ToolBar removeToolBar(int index) |
194 |
{ |
195 |
java.lang.Object obj = _toolBarList.elementAt(index); |
196 |
_toolBarList.removeElementAt(index); |
197 |
return (org.gvsig.andami.persistence.generate.ToolBar) obj;
|
198 |
} //-- com.iver.andami.persistence.generate.ToolBar removeToolBar(int)
|
199 |
|
200 |
/**
|
201 |
* Method setToolBar
|
202 |
*
|
203 |
* @param index
|
204 |
* @param vToolBar
|
205 |
*/
|
206 |
public void setToolBar(int index, org.gvsig.andami.persistence.generate.ToolBar vToolBar) |
207 |
throws java.lang.IndexOutOfBoundsException
|
208 |
{ |
209 |
//-- check bounds for index
|
210 |
if ((index < 0) || (index > _toolBarList.size())) { |
211 |
throw new IndexOutOfBoundsException(); |
212 |
} |
213 |
_toolBarList.setElementAt(vToolBar, index); |
214 |
} //-- void setToolBar(int, com.iver.andami.persistence.generate.ToolBar)
|
215 |
|
216 |
/**
|
217 |
* Method setToolBar
|
218 |
*
|
219 |
* @param toolBarArray
|
220 |
*/
|
221 |
public void setToolBar(org.gvsig.andami.persistence.generate.ToolBar[] toolBarArray) |
222 |
{ |
223 |
//-- copy array
|
224 |
_toolBarList.removeAllElements(); |
225 |
for (int i = 0; i < toolBarArray.length; i++) { |
226 |
_toolBarList.addElement(toolBarArray[i]); |
227 |
} |
228 |
} //-- void setToolBar(com.iver.andami.persistence.generate.ToolBar)
|
229 |
|
230 |
/**
|
231 |
* Method unmarshal
|
232 |
*
|
233 |
* @param reader
|
234 |
*/
|
235 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
236 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
237 |
{ |
238 |
return (org.gvsig.andami.persistence.generate.ToolBars) Unmarshaller.unmarshal(org.gvsig.andami.persistence.generate.ToolBars.class, reader);
|
239 |
} //-- java.lang.Object unmarshal(java.io.Reader)
|
240 |
|
241 |
/**
|
242 |
* Method validate
|
243 |
*/
|
244 |
public void validate() |
245 |
throws org.exolab.castor.xml.ValidationException
|
246 |
{ |
247 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
|
248 |
validator.validate(this);
|
249 |
} //-- void validate()
|
250 |
|
251 |
} |