Annotation Type Parameter
@Target(FIELD)
@Retention(RUNTIME)
public @interface Parameter
The class is used to annotate fields the user wants to be shown in his Strategy GUI. Numeric object types are accepted (Byte, Short, Integer, Long, Float, Double) for annotated fields as long as String or Boolean or Color. Any field must be initialized. A spinner gets created for a numeric type. The user should specify step, minimum and maximum values for the spinner. Otherwise, 1 will be used as the default step value, 0 as minimum value, and maximal field type value as maximum value. Step, minimum and maximum values for any other field type should not be specified. Even if specified, they will be ignored. A text field will be created for a String type field, a checkbox for Boolean, and a color interface for Color.
You can use CustomSettingsPanelProvider in order to construct UI
directly (and use Api.setSettings(Object) and
Api.getSettings(Class) to store/load settings)
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Stringnamename displayed in UI -
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description doublemaximummaximum value for a numeric field type onlydoubleminimumminimum value for a numeric field type onlybooleanreloadOnChangeif true, the instrument gets reloaded after the parameter has been changeddoublestepstep value for a numeric field type only
-
Element Details
-
name
java.lang.String namename displayed in UI
-
-
-
step
double stepstep value for a numeric field type only- Default:
- 1.0
-
minimum
double minimumminimum value for a numeric field type only- Default:
- 0.0/0.0
-
maximum
double maximummaximum value for a numeric field type only- Default:
- 0.0/0.0
-
reloadOnChange
boolean reloadOnChangeif true, the instrument gets reloaded after the parameter has been changed- Default:
- true
-