Class DiscreteDesc

java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<StringInfo>
com.motivewave.platform.sdk.common.desc.DiscreteDesc

public class DiscreteDesc extends SettingDescriptor<StringInfo>
Describes a discrete set of values the user can choose from.
  • Constructor Details

    • DiscreteDesc

      public DiscreteDesc(String id, String label, String defaultValue, List<NVP> values)
      Constructor
      Parameters:
      id - id of this setting (key)
      label - label displayed to the user
      defaultValue - default value for the setting
      values - set of valid choices (as Name Value Pairs ie NVP)
    • DiscreteDesc

      public DiscreteDesc(String id, String label, StringInfo defaultValue, List<NVP> values)
      Constructor
      Parameters:
      id - id of this setting (key)
      label - label displayed to the user
      defaultValue - default value for the setting
      values - set of valid choices (as Name Value Pairs ie NVP)
    • DiscreteDesc

      public DiscreteDesc(String id, String label, StringInfo defaultValue, List<NVP> values, boolean supportsDisable)
      Constructor
      Parameters:
      id - id of this setting (key)
      label - label displayed to the user
      defaultValue - default value for the setting
      values - set of valid choices (as Name Value Pairs ie NVP)
      supportsDisable - true if the user can disable this setting
  • Method Details

    • getValues

      public List<NVP> getValues()
      Gets the list of valid choices.
    • createInputFX

      public javafx.scene.Node createInputFX(Settings settings, boolean readOnly)
      Description copied from class: SettingDescriptor
      Creates the component that will accept the user input. This is called by the study framework.
      Specified by:
      createInputFX in class SettingDescriptor<StringInfo>
      Parameters:
      settings - settings for the study
      readOnly - true if the component should not accept user input
      Returns:
      component that will accept user input.
    • fromJson

      public Object fromJson(Object json)
      Overrides:
      fromJson in class SettingDescriptor<StringInfo>