Revision 38564 branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/plugins/config/generate/SelectableToolDescriptor.java
SelectableToolDescriptor.java | ||
---|---|---|
277 | 277 |
} |
278 | 278 |
} ); |
279 | 279 |
desc.setHandler(handler); |
280 |
desc.setRequired(true); |
|
280 |
// desc.setRequired(true);
|
|
281 | 281 |
addFieldDescriptor(desc); |
282 | 282 |
|
283 | 283 |
//-- validation code for: _icon |
... | ... | |
398 | 398 |
} |
399 | 399 |
desc.setValidator(fieldValidator); |
400 | 400 |
//-- _position |
401 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute);
|
|
401 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute);
|
|
402 | 402 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
403 | 403 |
public java.lang.Object getValue( java.lang.Object object ) |
404 | 404 |
throws IllegalStateException |
... | ... | |
406 | 406 |
SelectableTool target = (SelectableTool) object; |
407 | 407 |
if(!target.hasPosition()) |
408 | 408 |
return null; |
409 |
return new java.lang.Integer(target.getPosition());
|
|
409 |
return new java.lang.Long(target.getPosition());
|
|
410 | 410 |
} |
411 | 411 |
public void setValue( java.lang.Object object, java.lang.Object value) |
412 | 412 |
throws IllegalStateException, IllegalArgumentException |
... | ... | |
418 | 418 |
target.deletePosition(); |
419 | 419 |
return; |
420 | 420 |
} |
421 |
target.setPosition( ((java.lang.Integer)value).intValue());
|
|
421 |
target.setPosition( ((java.lang.Long)value).longValue());
|
|
422 | 422 |
} |
423 | 423 |
catch (java.lang.Exception ex) { |
424 | 424 |
throw new IllegalStateException(ex.toString()); |
... | ... | |
434 | 434 |
//-- validation code for: _position |
435 | 435 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
436 | 436 |
{ //-- local scope |
437 |
IntegerValidator typeValidator= new IntegerValidator();
|
|
437 |
LongValidator typeValidator= new LongValidator();
|
|
438 | 438 |
fieldValidator.setValidator(typeValidator); |
439 | 439 |
} |
440 | 440 |
desc.setValidator(fieldValidator); |
Also available in: Unified diff