Annotation Interface FieldDescriptor
Annotation for a field in a model to control how that field should be handled in an editor e.g. whether it should be
visible, the associated unit, minimum/maximum permitted value etc.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIf the field is a String, java.io.File, java.nio.file.Path or IResource you may use this annotation to define the type of checking which will be done.The label attribute.doubleIf scannable is set, this value overrides the maximum of the scannble, otherwise the scannable is used.doubleIf scannable is set, this value overrides the minimum of the scannble, otherwise the scannable is used.The number format to format a field editing a numberIf scannable is set, this value overrides the unit of the scannble, otherwise the scannable unit is used.boolean
-
Element Details
-
visible
boolean visible- Returns:
- true if the field is visible in the UI
- Default:
true
-
editable
boolean editable- Returns:
- true if the field is editable or false for read only.
- Default:
true
-
label
String labelThe label attribute. If unset, uses the name of the field for the label.- Default:
""
-
maximum
double maximumIf scannable is set, this value overrides the maximum of the scannble, otherwise the scannable is used.- Returns:
- maximum allowed legal value for field
- Default:
1.0/0.0
-
minimum
double minimumIf scannable is set, this value overrides the minimum of the scannble, otherwise the scannable is used.- Returns:
- minimum allowed legal value for field
- Default:
-1.0/0.0
-
unit
String unitIf scannable is set, this value overrides the unit of the scannble, otherwise the scannable unit is used.- Returns:
- the unit that the fields value should be in.
- Default:
""
-
hint
String hint- Returns:
- the string hint which is shown to the user when they first edit the value.
- Default:
""
-
file
FileType fileIf the field is a String, java.io.File, java.nio.file.Path or IResource you may use this annotation to define the type of checking which will be done.If this field is not used and your field is a File for instance, the NEW_FILE option will be the default, rather than NONE
- Returns:
- the file type.
- Default:
NONE
-
numberFormat
String numberFormatThe number format to format a field editing a number- Default:
""
-