Revision 5346
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/SelectableTool.java | ||
---|---|---|
76 | 76 |
*/ |
77 | 77 |
private java.lang.String _group = "unico"; |
78 | 78 |
|
79 |
/** |
|
80 |
* Field _position |
|
81 |
*/ |
|
82 |
private int _position; |
|
79 | 83 |
|
84 |
/** |
|
85 |
* keeps track of state for field: _position |
|
86 |
*/ |
|
87 |
private boolean _has_position; |
|
88 |
|
|
89 |
|
|
80 | 90 |
//----------------/ |
81 | 91 |
//- Constructors -/ |
82 | 92 |
//----------------/ |
... | ... | |
108 | 118 |
} //-- void deleteLast() |
109 | 119 |
|
110 | 120 |
/** |
121 |
* Method deletePosition |
|
122 |
*/ |
|
123 |
public void deletePosition() |
|
124 |
{ |
|
125 |
this._has_position= false; |
|
126 |
} //-- void deletePosition() |
|
127 |
|
|
128 |
/** |
|
111 | 129 |
* Returns the value of field 'actionCommand'. |
112 | 130 |
* |
113 | 131 |
* @return the value of field 'actionCommand'. |
... | ... | |
168 | 186 |
} //-- boolean getLast() |
169 | 187 |
|
170 | 188 |
/** |
189 |
* Returns the value of field 'position'. |
|
190 |
* |
|
191 |
* @return the value of field 'position'. |
|
192 |
*/ |
|
193 |
public int getPosition() |
|
194 |
{ |
|
195 |
return this._position; |
|
196 |
} //-- int getPosition() |
|
197 |
|
|
198 |
/** |
|
171 | 199 |
* Returns the value of field 'text'. |
172 | 200 |
* |
173 | 201 |
* @return the value of field 'text'. |
... | ... | |
204 | 232 |
} //-- boolean hasLast() |
205 | 233 |
|
206 | 234 |
/** |
235 |
* Method hasPosition |
|
236 |
*/ |
|
237 |
public boolean hasPosition() |
|
238 |
{ |
|
239 |
return this._has_position; |
|
240 |
} //-- boolean hasPosition() |
|
241 |
|
|
242 |
/** |
|
207 | 243 |
* Method isValid |
208 | 244 |
*/ |
209 | 245 |
public boolean isValid() |
... | ... | |
304 | 340 |
} //-- void setLast(boolean) |
305 | 341 |
|
306 | 342 |
/** |
343 |
* Sets the value of field 'position'. |
|
344 |
* |
|
345 |
* @param position the value of field 'position'. |
|
346 |
*/ |
|
347 |
public void setPosition(int position) |
|
348 |
{ |
|
349 |
this._position = position; |
|
350 |
this._has_position = true; |
|
351 |
} //-- void setPosition(int) |
|
352 |
|
|
353 |
/** |
|
307 | 354 |
* Sets the value of field 'text'. |
308 | 355 |
* |
309 | 356 |
* @param text the value of field 'text'. |
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ToolBar.java | ||
---|---|---|
12 | 12 |
//---------------------------------/ |
13 | 13 |
|
14 | 14 |
import java.util.Vector; |
15 |
|
|
16 | 15 |
import org.exolab.castor.xml.Marshaller; |
17 | 16 |
import org.exolab.castor.xml.Unmarshaller; |
18 | 17 |
|
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ActionToolDescriptor.java | ||
---|---|---|
282 | 282 |
} |
283 | 283 |
desc.setValidator(fieldValidator); |
284 | 284 |
//-- _position |
285 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
|
286 |
desc.setImmutable(true); |
|
285 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
|
287 | 286 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
288 | 287 |
public java.lang.Object getValue( java.lang.Object object ) |
289 | 288 |
throws IllegalStateException |
290 | 289 |
{ |
291 | 290 |
ActionTool target = (ActionTool) object; |
292 |
return target.getPosition(); |
|
291 |
if(!target.hasPosition()) |
|
292 |
return null; |
|
293 |
return new java.lang.Integer(target.getPosition()); |
|
293 | 294 |
} |
294 | 295 |
public void setValue( java.lang.Object object, java.lang.Object value) |
295 | 296 |
throws IllegalStateException, IllegalArgumentException |
296 | 297 |
{ |
297 | 298 |
try { |
298 | 299 |
ActionTool target = (ActionTool) object; |
299 |
target.setPosition( (java.lang.String) value); |
|
300 |
// if null, use delete method for optional primitives |
|
301 |
if (value == null) { |
|
302 |
target.deletePosition(); |
|
303 |
return; |
|
304 |
} |
|
305 |
target.setPosition( ((java.lang.Integer)value).intValue()); |
|
300 | 306 |
} |
301 | 307 |
catch (java.lang.Exception ex) { |
302 | 308 |
throw new IllegalStateException(ex.toString()); |
... | ... | |
312 | 318 |
//-- validation code for: _position |
313 | 319 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
314 | 320 |
{ //-- local scope |
315 |
StringValidator typeValidator = new StringValidator(); |
|
316 |
typeValidator.setWhiteSpace("preserve"); |
|
321 |
IntegerValidator typeValidator= new IntegerValidator(); |
|
317 | 322 |
fieldValidator.setValidator(typeValidator); |
318 | 323 |
} |
319 | 324 |
desc.setValidator(fieldValidator); |
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ActionTool.java | ||
---|---|---|
64 | 64 |
/** |
65 | 65 |
* Field _position |
66 | 66 |
*/ |
67 |
private java.lang.String _position;
|
|
67 |
private int _position;
|
|
68 | 68 |
|
69 |
/** |
|
70 |
* keeps track of state for field: _position |
|
71 |
*/ |
|
72 |
private boolean _has_position; |
|
69 | 73 |
|
74 |
|
|
70 | 75 |
//----------------/ |
71 | 76 |
//- Constructors -/ |
72 | 77 |
//----------------/ |
... | ... | |
89 | 94 |
} //-- void deleteLast() |
90 | 95 |
|
91 | 96 |
/** |
97 |
* Method deletePosition |
|
98 |
*/ |
|
99 |
public void deletePosition() |
|
100 |
{ |
|
101 |
this._has_position= false; |
|
102 |
} //-- void deletePosition() |
|
103 |
|
|
104 |
/** |
|
92 | 105 |
* Returns the value of field 'actionCommand'. |
93 | 106 |
* |
94 | 107 |
* @return the value of field 'actionCommand'. |
... | ... | |
133 | 146 |
* |
134 | 147 |
* @return the value of field 'position'. |
135 | 148 |
*/ |
136 |
public java.lang.String getPosition()
|
|
149 |
public int getPosition()
|
|
137 | 150 |
{ |
138 | 151 |
return this._position; |
139 |
} //-- java.lang.String getPosition()
|
|
152 |
} //-- int getPosition()
|
|
140 | 153 |
|
141 | 154 |
/** |
142 | 155 |
* Returns the value of field 'text'. |
... | ... | |
167 | 180 |
} //-- boolean hasLast() |
168 | 181 |
|
169 | 182 |
/** |
183 |
* Method hasPosition |
|
184 |
*/ |
|
185 |
public boolean hasPosition() |
|
186 |
{ |
|
187 |
return this._has_position; |
|
188 |
} //-- boolean hasPosition() |
|
189 |
|
|
190 |
/** |
|
170 | 191 |
* Method isValid |
171 | 192 |
*/ |
172 | 193 |
public boolean isValid() |
... | ... | |
250 | 271 |
* |
251 | 272 |
* @param position the value of field 'position'. |
252 | 273 |
*/ |
253 |
public void setPosition(java.lang.String position)
|
|
274 |
public void setPosition(int position)
|
|
254 | 275 |
{ |
255 | 276 |
this._position = position; |
256 |
} //-- void setPosition(java.lang.String) |
|
277 |
this._has_position = true; |
|
278 |
} //-- void setPosition(int) |
|
257 | 279 |
|
258 | 280 |
/** |
259 | 281 |
* Sets the value of field 'text'. |
Also available in: Unified diff