root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / plugins / config / generate / Menu.java @ 38564
History | View | Annotate | Download (9.69 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: Menu.java 38564 2012-07-16 11:19:13Z jjdelcerro $
|
6 |
*/
|
7 |
|
8 |
package org.gvsig.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 org.exolab.castor.xml.MarshalException; |
19 |
import org.exolab.castor.xml.Marshaller; |
20 |
import org.exolab.castor.xml.Unmarshaller; |
21 |
import org.exolab.castor.xml.ValidationException; |
22 |
import org.xml.sax.ContentHandler; |
23 |
|
24 |
/**
|
25 |
* Class Menu.
|
26 |
*
|
27 |
* @version $Revision: 38564 $ $Date: 2012-07-16 13:19:13 +0200 (Mon, 16 Jul 2012) $
|
28 |
*/
|
29 |
public class Menu implements java.io.Serializable { |
30 |
|
31 |
|
32 |
//--------------------------/
|
33 |
//- Class/Member Variables -/
|
34 |
//--------------------------/
|
35 |
/**
|
36 |
* Field _name
|
37 |
*/
|
38 |
private java.lang.String _name;
|
39 |
|
40 |
/**
|
41 |
* Field _actionCommand
|
42 |
*/
|
43 |
private java.lang.String _actionCommand;
|
44 |
|
45 |
/**
|
46 |
* Field _key
|
47 |
*/
|
48 |
private java.lang.String _key;
|
49 |
|
50 |
/**
|
51 |
* Field _icon
|
52 |
*/
|
53 |
private java.lang.String _icon;
|
54 |
|
55 |
/**
|
56 |
* Field _tooltip
|
57 |
*/
|
58 |
private java.lang.String _tooltip;
|
59 |
|
60 |
/**
|
61 |
* Field _enableText
|
62 |
*/
|
63 |
private java.lang.String _enableText;
|
64 |
|
65 |
/**
|
66 |
* Field _mnemonic
|
67 |
*/
|
68 |
private java.lang.String _mnemonic;
|
69 |
|
70 |
/**
|
71 |
* Field _text
|
72 |
*/
|
73 |
private java.lang.String _text;
|
74 |
|
75 |
/**
|
76 |
* Field _position
|
77 |
*/
|
78 |
private long _position; |
79 |
|
80 |
/**
|
81 |
* keeps track of state for field: _position
|
82 |
*/
|
83 |
private boolean _has_position; |
84 |
|
85 |
/**
|
86 |
* Field _is_separator
|
87 |
*/
|
88 |
private boolean _is_separator; |
89 |
|
90 |
/**
|
91 |
* keeps track of state for field: _is_separator
|
92 |
*/
|
93 |
private boolean _has_is_separator; |
94 |
|
95 |
|
96 |
//----------------/
|
97 |
//- Constructors -/
|
98 |
//----------------/
|
99 |
|
100 |
public Menu() { |
101 |
super();
|
102 |
} //-- com.iver.andami.plugins.config.generate.Menu()
|
103 |
|
104 |
|
105 |
//-----------/
|
106 |
//- Methods -/
|
107 |
//-----------/
|
108 |
|
109 |
/**
|
110 |
* Method deleteIs_separator
|
111 |
*/
|
112 |
public void deleteIs_separator() |
113 |
{ |
114 |
this._has_is_separator= false; |
115 |
} //-- void deleteIs_separator()
|
116 |
|
117 |
/**
|
118 |
* Method deletePosition
|
119 |
*/
|
120 |
public void deletePosition() |
121 |
{ |
122 |
this._has_position= false; |
123 |
} //-- void deletePosition()
|
124 |
|
125 |
/**
|
126 |
* Returns the value of field 'actionCommand'.
|
127 |
*
|
128 |
* @return the value of field 'actionCommand'.
|
129 |
*/
|
130 |
public java.lang.String getActionCommand()
|
131 |
{ |
132 |
return this._actionCommand; |
133 |
} //-- java.lang.String getActionCommand()
|
134 |
|
135 |
/**
|
136 |
* Returns the value of field 'enableText'.
|
137 |
*
|
138 |
* @return the value of field 'enableText'.
|
139 |
*/
|
140 |
public java.lang.String getEnableText()
|
141 |
{ |
142 |
return this._enableText; |
143 |
} //-- java.lang.String getEnableText()
|
144 |
|
145 |
/**
|
146 |
* Returns the value of field 'icon'.
|
147 |
*
|
148 |
* @return the value of field 'icon'.
|
149 |
*/
|
150 |
public java.lang.String getIcon()
|
151 |
{ |
152 |
return this._icon; |
153 |
} //-- java.lang.String getIcon()
|
154 |
|
155 |
/**
|
156 |
* Returns the value of field 'is_separator'.
|
157 |
*
|
158 |
* @return the value of field 'is_separator'.
|
159 |
*/
|
160 |
public boolean getIs_separator() |
161 |
{ |
162 |
return this._is_separator; |
163 |
} //-- boolean getIs_separator()
|
164 |
|
165 |
/**
|
166 |
* Returns the value of field 'key'.
|
167 |
*
|
168 |
* @return the value of field 'key'.
|
169 |
*/
|
170 |
public java.lang.String getKey()
|
171 |
{ |
172 |
return this._key; |
173 |
} //-- java.lang.String getKey()
|
174 |
|
175 |
/**
|
176 |
* Returns the value of field 'mnemonic'.
|
177 |
*
|
178 |
* @return the value of field 'mnemonic'.
|
179 |
*/
|
180 |
public java.lang.String getMnemonic()
|
181 |
{ |
182 |
return this._mnemonic; |
183 |
} //-- java.lang.String getMnemonic()
|
184 |
|
185 |
/**
|
186 |
* Returns the value of field 'position'.
|
187 |
*
|
188 |
* @return the value of field 'position'.
|
189 |
*/
|
190 |
public long getPosition() |
191 |
{ |
192 |
return this._position; |
193 |
} //-- int getPosition()
|
194 |
|
195 |
/**
|
196 |
* Returns the value of field 'text'.
|
197 |
*
|
198 |
* @return the value of field 'text'.
|
199 |
*/
|
200 |
public java.lang.String getText()
|
201 |
{ |
202 |
return this._text; |
203 |
} //-- java.lang.String getText()
|
204 |
|
205 |
/**
|
206 |
* Returns the value of field 'tooltip'.
|
207 |
*
|
208 |
* @return the value of field 'tooltip'.
|
209 |
*/
|
210 |
public java.lang.String getTooltip()
|
211 |
{ |
212 |
return this._tooltip; |
213 |
} //-- java.lang.String getTooltip()
|
214 |
|
215 |
/**
|
216 |
* Method hasIs_separator
|
217 |
*/
|
218 |
public boolean hasIs_separator() |
219 |
{ |
220 |
return this._has_is_separator; |
221 |
} //-- boolean hasIs_separator()
|
222 |
|
223 |
/**
|
224 |
* Method hasPosition
|
225 |
*/
|
226 |
public boolean hasPosition() |
227 |
{ |
228 |
return this._has_position; |
229 |
} //-- boolean hasPosition()
|
230 |
|
231 |
/**
|
232 |
* Method isValid
|
233 |
*/
|
234 |
public boolean isValid() |
235 |
{ |
236 |
try {
|
237 |
validate(); |
238 |
} |
239 |
catch (org.exolab.castor.xml.ValidationException vex) {
|
240 |
return false; |
241 |
} |
242 |
return true; |
243 |
} //-- boolean isValid()
|
244 |
|
245 |
/**
|
246 |
* Returns the value of field 'name'.
|
247 |
*
|
248 |
* @return the value of field 'name'.
|
249 |
*/
|
250 |
public java.lang.String getName()
|
251 |
{ |
252 |
return this._name; |
253 |
} //-- java.lang.String getName()
|
254 |
|
255 |
/**
|
256 |
* Method marshal
|
257 |
*
|
258 |
* @param out
|
259 |
*/
|
260 |
public void marshal(java.io.Writer out) |
261 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
262 |
{ |
263 |
|
264 |
Marshaller.marshal(this, out);
|
265 |
} //-- void marshal(java.io.Writer)
|
266 |
|
267 |
/**
|
268 |
* Method marshal
|
269 |
*
|
270 |
* @param handler
|
271 |
*/
|
272 |
public void marshal(org.xml.sax.ContentHandler handler) |
273 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
274 |
{ |
275 |
|
276 |
Marshaller.marshal(this, handler);
|
277 |
} //-- void marshal(org.xml.sax.ContentHandler)
|
278 |
|
279 |
/**
|
280 |
* Sets the value of field 'actionCommand'.
|
281 |
*
|
282 |
* @param actionCommand the value of field 'actionCommand'.
|
283 |
*/
|
284 |
public void setActionCommand(java.lang.String actionCommand) |
285 |
{ |
286 |
this._actionCommand = actionCommand;
|
287 |
} //-- void setActionCommand(java.lang.String)
|
288 |
|
289 |
/**
|
290 |
* Sets the value of field 'enableText'.
|
291 |
*
|
292 |
* @param enableText the value of field 'enableText'.
|
293 |
*/
|
294 |
public void setEnableText(java.lang.String enableText) |
295 |
{ |
296 |
this._enableText = enableText;
|
297 |
} //-- void setEnableText(java.lang.String)
|
298 |
|
299 |
/**
|
300 |
* Sets the value of field 'icon'.
|
301 |
*
|
302 |
* @param icon the value of field 'icon'.
|
303 |
*/
|
304 |
public void setIcon(java.lang.String icon) |
305 |
{ |
306 |
this._icon = icon;
|
307 |
} //-- void setIcon(java.lang.String)
|
308 |
|
309 |
/**
|
310 |
* Sets the value of field 'is_separator'.
|
311 |
*
|
312 |
* @param is_separator the value of field 'is_separator'.
|
313 |
*/
|
314 |
public void setIs_separator(boolean is_separator) |
315 |
{ |
316 |
this._is_separator = is_separator;
|
317 |
this._has_is_separator = true; |
318 |
} //-- void setIs_separator(boolean)
|
319 |
|
320 |
/**
|
321 |
* Sets the value of field 'key'.
|
322 |
*
|
323 |
* @param key the value of field 'key'.
|
324 |
*/
|
325 |
public void setKey(java.lang.String key) |
326 |
{ |
327 |
this._key = key;
|
328 |
} //-- void setKey(java.lang.String)
|
329 |
|
330 |
/**
|
331 |
* Sets the value of field 'mnemonic'.
|
332 |
*
|
333 |
* @param mnemonic the value of field 'mnemonic'.
|
334 |
*/
|
335 |
public void setMnemonic(java.lang.String mnemonic) |
336 |
{ |
337 |
this._mnemonic = mnemonic;
|
338 |
} //-- void setMnemonic(java.lang.String)
|
339 |
|
340 |
/**
|
341 |
* Sets the value of field 'name'.
|
342 |
*
|
343 |
* @param name the value of field 'name'.
|
344 |
*/
|
345 |
public void setName(java.lang.String name) |
346 |
{ |
347 |
this._name = name;
|
348 |
} //-- void setName(java.lang.String)
|
349 |
|
350 |
/**
|
351 |
* Sets the value of field 'position'.
|
352 |
*
|
353 |
* @param position the value of field 'position'.
|
354 |
*/
|
355 |
public void setPosition(long position) |
356 |
{ |
357 |
this._position = position;
|
358 |
this._has_position = true; |
359 |
} //-- void setPosition(int)
|
360 |
|
361 |
/**
|
362 |
* Sets the value of field 'text'.
|
363 |
*
|
364 |
* @param text the value of field 'text'.
|
365 |
*/
|
366 |
public void setText(java.lang.String text) |
367 |
{ |
368 |
this._text = text;
|
369 |
} //-- void setText(java.lang.String)
|
370 |
|
371 |
/**
|
372 |
* Sets the value of field 'tooltip'.
|
373 |
*
|
374 |
* @param tooltip the value of field 'tooltip'.
|
375 |
*/
|
376 |
public void setTooltip(java.lang.String tooltip) |
377 |
{ |
378 |
this._tooltip = tooltip;
|
379 |
} //-- void setTooltip(java.lang.String)
|
380 |
|
381 |
/**
|
382 |
* Method unmarshal
|
383 |
*
|
384 |
* @param reader
|
385 |
*/
|
386 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
387 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
388 |
{ |
389 |
return (org.gvsig.andami.plugins.config.generate.Menu) Unmarshaller.unmarshal(org.gvsig.andami.plugins.config.generate.Menu.class, reader);
|
390 |
} //-- java.lang.Object unmarshal(java.io.Reader)
|
391 |
|
392 |
/**
|
393 |
* Method validate
|
394 |
*/
|
395 |
public void validate() |
396 |
throws org.exolab.castor.xml.ValidationException
|
397 |
{ |
398 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
|
399 |
validator.validate(this);
|
400 |
} //-- void validate()
|
401 |
|
402 |
public String toString() { |
403 |
StringBuffer buffer = new StringBuffer(); |
404 |
buffer.append("Menu {");
|
405 |
buffer.append("name='").append(this._name).append("', "); |
406 |
buffer.append("text='").append(this._text).append("', "); |
407 |
buffer.append("tooltip='").append(this._tooltip).append("', "); |
408 |
buffer.append("actionCommand='").append(this._actionCommand).append("', "); |
409 |
buffer.append("position='").append(this._position).append("', "); |
410 |
buffer.append("icon='").append(this._icon).append("', "); |
411 |
buffer.append("enableText='").append(this._enableText).append("' }"); |
412 |
return buffer.toString();
|
413 |
} |
414 |
} |