Annotation Interface Preference


@Documented @Retention(RUNTIME) @Target(FIELD) public @interface Preference
Annotation for user preferences. Use is mandatory if preferences are supplied via a bean, see DefaultConfigController.createPropertySet() and DefaultConfigController.createPropertySet(Object).
See Also:
  • Element Details

    • label

      String label
      Returns:
      The label of the property. Must not be empty.
    • key

      String key
      Returns:
      The property key. Must not be empty.
    • config

      String config
      Returns:
      The configuration name. If not set, the NetBeans preferences are used, otherwise preferences from a named configuration are used (Config.instance(config).preferences()).
      Default:
      ""
    • valueSet

      String[] valueSet
      Returns:
      The set of allowed values.
      Default:
      {}
    • interval

      String interval
      Gets the valid interval for numeric parameters, e.g. "[10,20)": in the range 10 (inclusive) to 20 (exclusive).
      Returns:
      The valid interval. Defaults to empty string (= not set).
      Default:
      ""
    • description

      String description
      Description text (used for tooltips).
      Default:
      ""
    • validatorClass

      Class<? extends Validator> validatorClass
      Returns:
      The validator class.
      Default:
      org.esa.snap.rcp.preferences.Preference.NullValidator.class