Revision 5281
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ActionToolDescriptor.java | ||
---|---|---|
11 | 11 |
//- Imported classes and packages -/ |
12 | 12 |
//---------------------------------/ |
13 | 13 |
|
14 |
import org.exolab.castor.xml.validators.BooleanValidator; |
|
15 |
import org.exolab.castor.xml.validators.StringValidator; |
|
14 |
import org.exolab.castor.xml.validators.*; |
|
16 | 15 |
|
17 | 16 |
/** |
18 | 17 |
* Class ActionToolDescriptor. |
... | ... | |
282 | 281 |
fieldValidator.setValidator(typeValidator); |
283 | 282 |
} |
284 | 283 |
desc.setValidator(fieldValidator); |
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); |
|
287 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
288 |
public java.lang.Object getValue( java.lang.Object object ) |
|
289 |
throws IllegalStateException |
|
290 |
{ |
|
291 |
ActionTool target = (ActionTool) object; |
|
292 |
return target.getPosition(); |
|
293 |
} |
|
294 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
295 |
throws IllegalStateException, IllegalArgumentException |
|
296 |
{ |
|
297 |
try { |
|
298 |
ActionTool target = (ActionTool) object; |
|
299 |
target.setPosition( (java.lang.String) value); |
|
300 |
} |
|
301 |
catch (java.lang.Exception ex) { |
|
302 |
throw new IllegalStateException(ex.toString()); |
|
303 |
} |
|
304 |
} |
|
305 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
306 |
return null; |
|
307 |
} |
|
308 |
} ); |
|
309 |
desc.setHandler(handler); |
|
310 |
addFieldDescriptor(desc); |
|
311 |
|
|
312 |
//-- validation code for: _position |
|
313 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
314 |
{ //-- local scope |
|
315 |
StringValidator typeValidator = new StringValidator(); |
|
316 |
typeValidator.setWhiteSpace("preserve"); |
|
317 |
fieldValidator.setValidator(typeValidator); |
|
318 |
} |
|
319 |
desc.setValidator(fieldValidator); |
|
285 | 320 |
//-- initialize element descriptors |
286 | 321 |
|
287 | 322 |
} //-- com.iver.andami.plugins.config.generate.ActionToolDescriptor() |
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ActionTool.java | ||
---|---|---|
61 | 61 |
*/ |
62 | 62 |
private java.lang.String _enableText; |
63 | 63 |
|
64 |
/** |
|
65 |
* Field _position |
|
66 |
*/ |
|
67 |
private java.lang.String _position; |
|
64 | 68 |
|
69 |
|
|
65 | 70 |
//----------------/ |
66 | 71 |
//- Constructors -/ |
67 | 72 |
//----------------/ |
... | ... | |
124 | 129 |
} //-- boolean getLast() |
125 | 130 |
|
126 | 131 |
/** |
132 |
* Returns the value of field 'position'. |
|
133 |
* |
|
134 |
* @return the value of field 'position'. |
|
135 |
*/ |
|
136 |
public java.lang.String getPosition() |
|
137 |
{ |
|
138 |
return this._position; |
|
139 |
} //-- java.lang.String getPosition() |
|
140 |
|
|
141 |
/** |
|
127 | 142 |
* Returns the value of field 'text'. |
128 | 143 |
* |
129 | 144 |
* @return the value of field 'text'. |
... | ... | |
231 | 246 |
} //-- void setLast(boolean) |
232 | 247 |
|
233 | 248 |
/** |
249 |
* Sets the value of field 'position'. |
|
250 |
* |
|
251 |
* @param position the value of field 'position'. |
|
252 |
*/ |
|
253 |
public void setPosition(java.lang.String position) |
|
254 |
{ |
|
255 |
this._position = position; |
|
256 |
} //-- void setPosition(java.lang.String) |
|
257 |
|
|
258 |
/** |
|
234 | 259 |
* Sets the value of field 'text'. |
235 | 260 |
* |
236 | 261 |
* @param text the value of field 'text'. |
Also available in: Unified diff