Annotation Interface Param


@Retention(RUNTIME) @Target(FIELD) public @interface Param
Marks a field of a simulation model as a setting: the HTML export shows it as a control (a slider with min and max, else a number field, a checkbox for a boolean, a choice with options, else a text field). The value is read again at every step (live) or, with restart = true, at the next setup. Settings with the same group are shown below a heading.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The group of the setting: a heading above the settings of the group (empty: no heading).
    The label (default: the name of the field).
    double
    The maximum of a slider.
    double
    The minimum of a slider (min and max both set: a slider).
    The options of a String field (a choice).
    boolean
    true: a change restarts the simulation (setup) instead of a live change.
    double
    The step of a slider (default: 1 for int fields, (max - min) / 100 else).
  • Element Details

    • label

      String label
      The label (default: the name of the field).
      Default:
      ""
    • min

      double min
      The minimum of a slider (min and max both set: a slider).
      Default:
      0.0/0.0
    • max

      double max
      The maximum of a slider.
      Default:
      0.0/0.0
    • step

      double step
      The step of a slider (default: 1 for int fields, (max - min) / 100 else).
      Default:
      0.0/0.0
    • options

      String[] options
      The options of a String field (a choice).
      Default:
      {}
    • restart

      boolean restart
      true: a change restarts the simulation (setup) instead of a live change.
      Default:
      false
    • group

      String group
      The group of the setting: a heading above the settings of the group (empty: no heading).
      Default:
      ""