Class StringDescriptor

java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<String>
com.motivewave.platform.sdk.common.desc.StringDescriptor

public class StringDescriptor extends SettingDescriptor<String>
Describes a String input.
  • Constructor Details

    • StringDescriptor

      public StringDescriptor(String name, String label, String str)
      Constructor
      Parameters:
      name - name of this setting
      label - label displayed to the user
      str - default string value
    • StringDescriptor

      public StringDescriptor(String name, String label, String str, int width)
      Constructor
      Parameters:
      name - name of this setting
      label - label displayed to the user
      str - default string value
      width - text field width
    • StringDescriptor

      public StringDescriptor(String name, String label, String str, boolean enabled, boolean supportsDisable)
      Constructor
      Parameters:
      name - - Name of this setting
      label - - Label displayed to the user
      str - default string value
      enabled - true if this font is enabled
      supportsDisable - true if this font can be disabled
    • StringDescriptor

      public StringDescriptor(String name, String label, String str, int width, boolean enabled, boolean supportsDisable)
      Constructor
      Parameters:
      name - - Name of this setting
      label - - Label displayed to the user
      str - default string value
      width - text field width
      enabled - true if this font is enabled
      supportsDisable - true if this font can be disabled
  • Method Details

    • getDefaultValue

      public String getDefaultValue()
      Gets the default value for this setting.
      Overrides:
      getDefaultValue in class SettingDescriptor<String>
      Returns:
      default value for the setting
    • getHeight

      public int getHeight()
    • setHeight

      public StringDescriptor setHeight(int height)
    • createControl

      public javafx.scene.Node createControl(SettingsBase settings, boolean readOnly)
      Creates an editor for this input and returns it as a JavaFX Node.
      Overrides:
      createControl in class SettingDescriptor<String>
      Parameters:
      settings - settings for the study
      readOnly - true if the component should not accept user input
      Returns:
      component that will accept user input.
    • isRequired

      public boolean isRequired()
    • setRequired

      public void setRequired(boolean b)
    • getNotInValues

      public List<String> getNotInValues()
    • setNotInValues

      public void setNotInValues(List<String> values)
    • getNotInMessage

      public String getNotInMessage()
    • setNotInMessage

      public void setNotInMessage(String msg)
    • isDisplaySetting

      public boolean isDisplaySetting()
      Determines if this setting is used for display purposes only.
      Overrides:
      isDisplaySetting in class SettingDescriptor<String>
      Returns:
      true if this setting is for display purposes only
    • getString

      public String getString()
      Gets the string.
      Returns:
      string value
    • fromJson

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