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.String name
    name displayed in UI
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    double maximum
    maximum value for a numeric field type only
    double minimum
    minimum value for a numeric field type only
    boolean reloadOnChange
    if true, the instrument gets reloaded after the parameter has been changed
    double step
    step value for a numeric field type only
  • Element Details

    • name

      java.lang.String name
      name displayed in UI
    • step

      double step
      step value for a numeric field type only
      Default:
      1.0
    • minimum

      double minimum
      minimum value for a numeric field type only
      Default:
      0.0/0.0
    • maximum

      double maximum
      maximum value for a numeric field type only
      Default:
      0.0/0.0
    • reloadOnChange

      boolean reloadOnChange
      if true, the instrument gets reloaded after the parameter has been changed
      Default:
      true