svn-gvsig-desktop / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / plugins / config / generate / Action.java @ 38564
History | View | Annotate | Download (7.59 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 29593 2009-06-29 15:54:31Z jpiera $
|
6 |
*/
|
7 |
|
8 |
package org.gvsig.andami.plugins.config.generate; |
9 |
|
10 |
//---------------------------------/
|
11 |
//- Imported classes and packages -/
|
12 |
//---------------------------------/
|
13 |
|
14 |
import org.exolab.castor.xml.Marshaller; |
15 |
import org.exolab.castor.xml.Unmarshaller; |
16 |
|
17 |
/**
|
18 |
* Class Action.
|
19 |
*
|
20 |
* @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (lun, 29 jun 2009) $
|
21 |
*/
|
22 |
public class Action implements java.io.Serializable { |
23 |
|
24 |
|
25 |
//--------------------------/
|
26 |
//- Class/Member Variables -/
|
27 |
//--------------------------/
|
28 |
/**
|
29 |
* Field _name
|
30 |
*/
|
31 |
private java.lang.String _name;
|
32 |
|
33 |
/**
|
34 |
* Field _accelerator
|
35 |
*/
|
36 |
private java.lang.String _accelerator;
|
37 |
|
38 |
/**
|
39 |
* Field _actionCommand
|
40 |
*/
|
41 |
private java.lang.String _actionCommand;
|
42 |
|
43 |
/**
|
44 |
* Field _icon
|
45 |
*/
|
46 |
private java.lang.String _icon;
|
47 |
|
48 |
/**
|
49 |
* Field _tooltip
|
50 |
*/
|
51 |
private java.lang.String _tooltip;
|
52 |
|
53 |
/**
|
54 |
* Field _label
|
55 |
*/
|
56 |
private java.lang.String _label;
|
57 |
|
58 |
/**
|
59 |
* Field _position
|
60 |
*/
|
61 |
private long _position; |
62 |
|
63 |
/**
|
64 |
* keeps track of state for field: _position
|
65 |
*/
|
66 |
private boolean _has_position; |
67 |
|
68 |
|
69 |
//----------------/
|
70 |
//- Constructors -/
|
71 |
//----------------/
|
72 |
|
73 |
public Action() { |
74 |
super();
|
75 |
} //-- com.iver.andami.plugins.config.generate.Menu()
|
76 |
|
77 |
|
78 |
//-----------/
|
79 |
//- Methods -/
|
80 |
//-----------/
|
81 |
/**
|
82 |
* Method deletePosition
|
83 |
*/
|
84 |
public void deletePosition() |
85 |
{ |
86 |
this._has_position= false; |
87 |
} //-- void deletePosition()
|
88 |
|
89 |
/**
|
90 |
* Returns the value of field 'actionCommand'.
|
91 |
*
|
92 |
* @return the value of field 'actionCommand'.
|
93 |
*/
|
94 |
public java.lang.String getActionCommand()
|
95 |
{ |
96 |
return this._actionCommand; |
97 |
} //-- java.lang.String getActionCommand()
|
98 |
|
99 |
/**
|
100 |
* Returns the value of field 'accelerator'.
|
101 |
*
|
102 |
* @return the value of field 'accelerator'.
|
103 |
*/
|
104 |
public java.lang.String getAccelerator()
|
105 |
{ |
106 |
return this._accelerator; |
107 |
} //-- java.lang.String getAccelerator()
|
108 |
|
109 |
/**
|
110 |
* Returns the value of field 'icon'.
|
111 |
*
|
112 |
* @return the value of field 'icon'.
|
113 |
*/
|
114 |
public java.lang.String getIcon()
|
115 |
{ |
116 |
return this._icon; |
117 |
} //-- java.lang.String getIcon()
|
118 |
|
119 |
/**
|
120 |
* Returns the value of field 'position'.
|
121 |
*
|
122 |
* @return the value of field 'position'.
|
123 |
*/
|
124 |
public long getPosition() |
125 |
{ |
126 |
return this._position; |
127 |
} //-- int getPosition()
|
128 |
|
129 |
/**
|
130 |
* Returns the value of field 'label'.
|
131 |
*
|
132 |
* @return the value of field 'label'.
|
133 |
*/
|
134 |
public java.lang.String getLabel()
|
135 |
{ |
136 |
return this._label; |
137 |
} //-- java.lang.String getLabel()
|
138 |
|
139 |
/**
|
140 |
* Returns the value of field 'tooltip'.
|
141 |
*
|
142 |
* @return the value of field 'tooltip'.
|
143 |
*/
|
144 |
public java.lang.String getTooltip()
|
145 |
{ |
146 |
return this._tooltip; |
147 |
} //-- java.lang.String getTooltip()
|
148 |
|
149 |
/**
|
150 |
* Method hasPosition
|
151 |
*/
|
152 |
public boolean hasPosition() |
153 |
{ |
154 |
return this._has_position; |
155 |
} //-- boolean hasPosition()
|
156 |
|
157 |
/**
|
158 |
* Method isValid
|
159 |
*/
|
160 |
public boolean isValid() |
161 |
{ |
162 |
try {
|
163 |
validate(); |
164 |
} |
165 |
catch (org.exolab.castor.xml.ValidationException vex) {
|
166 |
return false; |
167 |
} |
168 |
return true; |
169 |
} //-- boolean isValid()
|
170 |
|
171 |
/**
|
172 |
* Returns the value of field 'name'.
|
173 |
*
|
174 |
* @return the value of field 'name'.
|
175 |
*/
|
176 |
public java.lang.String getName()
|
177 |
{ |
178 |
return this._name; |
179 |
} //-- java.lang.String getName()
|
180 |
|
181 |
/**
|
182 |
* Method marshal
|
183 |
*
|
184 |
* @param out
|
185 |
*/
|
186 |
public void marshal(java.io.Writer out) |
187 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
188 |
{ |
189 |
|
190 |
Marshaller.marshal(this, out);
|
191 |
} //-- void marshal(java.io.Writer)
|
192 |
|
193 |
/**
|
194 |
* Method marshal
|
195 |
*
|
196 |
* @param handler
|
197 |
*/
|
198 |
public void marshal(org.xml.sax.ContentHandler handler) |
199 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
200 |
{ |
201 |
|
202 |
Marshaller.marshal(this, handler);
|
203 |
} //-- void marshal(org.xml.sax.ContentHandler)
|
204 |
|
205 |
/**
|
206 |
* Sets the value of field 'actionCommand'.
|
207 |
*
|
208 |
* @param actionCommand the value of field 'actionCommand'.
|
209 |
*/
|
210 |
public void setActionCommand(java.lang.String actionCommand) |
211 |
{ |
212 |
this._actionCommand = actionCommand;
|
213 |
} //-- void setActionCommand(java.lang.String)
|
214 |
|
215 |
/**
|
216 |
* Sets the value of field 'accelerator'.
|
217 |
*
|
218 |
* @param accelerator the value of field 'accelerator'.
|
219 |
*/
|
220 |
public void setAccelerator(java.lang.String accelerator) |
221 |
{ |
222 |
this._accelerator = accelerator;
|
223 |
} //-- void setAccelerator(java.lang.String)
|
224 |
|
225 |
/**
|
226 |
* Sets the value of field 'icon'.
|
227 |
*
|
228 |
* @param icon the value of field 'icon'.
|
229 |
*/
|
230 |
public void setIcon(java.lang.String icon) |
231 |
{ |
232 |
this._icon = icon;
|
233 |
} //-- void setIcon(java.lang.String)
|
234 |
|
235 |
|
236 |
/**
|
237 |
* Sets the value of field 'name'.
|
238 |
*
|
239 |
* @param name the value of field 'name'.
|
240 |
*/
|
241 |
public void setName(java.lang.String name) |
242 |
{ |
243 |
this._name = name;
|
244 |
} //-- void setName(java.lang.String)
|
245 |
|
246 |
/**
|
247 |
* Sets the value of field 'position'.
|
248 |
*
|
249 |
* @param position the value of field 'position'.
|
250 |
*/
|
251 |
public void setPosition(long position) |
252 |
{ |
253 |
if( position < 100000000 ) { |
254 |
this._position = position + 1000000000; |
255 |
} else {
|
256 |
this._position = position;
|
257 |
} |
258 |
this._has_position = true; |
259 |
} //-- void setPosition(int)
|
260 |
|
261 |
/**
|
262 |
* Sets the value of field 'label'.
|
263 |
*
|
264 |
* @param text the value of field 'label'.
|
265 |
*/
|
266 |
public void setLabel(java.lang.String label) |
267 |
{ |
268 |
this._label = label;
|
269 |
} //-- void setLabel(java.lang.String)
|
270 |
|
271 |
/**
|
272 |
* Sets the value of field 'tooltip'.
|
273 |
*
|
274 |
* @param tooltip the value of field 'tooltip'.
|
275 |
*/
|
276 |
public void setTooltip(java.lang.String tooltip) |
277 |
{ |
278 |
this._tooltip = tooltip;
|
279 |
} //-- void setTooltip(java.lang.String)
|
280 |
|
281 |
/**
|
282 |
* Method unmarshal
|
283 |
*
|
284 |
* @param reader
|
285 |
*/
|
286 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
287 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
288 |
{ |
289 |
return (org.gvsig.andami.plugins.config.generate.Action) Unmarshaller.unmarshal(org.gvsig.andami.plugins.config.generate.Action.class, reader);
|
290 |
} //-- java.lang.Object unmarshal(java.io.Reader)
|
291 |
|
292 |
/**
|
293 |
* Method validate
|
294 |
*/
|
295 |
public void validate() |
296 |
throws org.exolab.castor.xml.ValidationException
|
297 |
{ |
298 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
|
299 |
validator.validate(this);
|
300 |
} //-- void validate()
|
301 |
|
302 |
public String toString() { |
303 |
StringBuffer buffer = new StringBuffer(); |
304 |
buffer.append("Action {");
|
305 |
buffer.append("name='").append(this._name).append("', "); |
306 |
buffer.append("label='").append(this._label).append("', "); |
307 |
buffer.append("tooltip='").append(this._tooltip).append("', "); |
308 |
buffer.append("actionCommand='").append(this._actionCommand).append("', "); |
309 |
buffer.append("position='").append(this._position).append("', "); |
310 |
buffer.append("icon='").append(this._icon).append("', "); |
311 |
buffer.append("accelerator='").append(this._accelerator).append("' }"); |
312 |
return buffer.toString();
|
313 |
} |
314 |
} |