Class GuideDescriptor

java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<GuideInfo>
com.motivewave.platform.sdk.common.desc.GuideDescriptor

public class GuideDescriptor extends SettingDescriptor<GuideInfo>
Describes a guide that is displayed on a study graph.
  • Constructor Details

    • GuideDescriptor

      public GuideDescriptor(String name, String label, double value, double minValue, double maxValue, double step, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of this setting (key)
      label - label displayed to the user
      value - default y value for displaying this guide
      minValue - minimum y value for the guide
      maxValue - maximum y value for the guide
      step - incremental step
      supportsDisable - indicates if the user can disable this setting.
  • Method Details

    • getDefaultValue

      public GuideInfo getDefaultValue()
      Gets the default value for this setting.
      Overrides:
      getDefaultValue in class SettingDescriptor<GuideInfo>
      Returns:
      default value for the setting
    • 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<GuideInfo>
      Parameters:
      settings - settings for the study
      readOnly - true if the component should not accept user input
      Returns:
      component that will accept user input.
    • getMinValue

      public double getMinValue()
      Gets the minimum value for the guide.
    • getMaxValue

      public double getMaxValue()
      Gets the maximum value for the guide.
    • getStep

      public double getStep()
      Gets the step increment.
    • getLineColor

      public Color getLineColor()
      Gets the default line color for the guide.
    • setLineColor

      public void setLineColor(Color c)
      Sets the default line color for the guide.
    • getLabelColor

      public Color getLabelColor()
      Gets the default label color for the guide indicator.
    • setLabelColor

      public void setLabelColor(Color c)
      Sets the default label color for the guide indicator.
    • getTextColor

      public Color getTextColor()
      Gets the default text color for the guide indicator.
    • setTextColor

      public void setTextColor(Color c)
      Sets the default text color for the guide indicator.
    • getWidth

      public float getWidth()
      Gets the default line width for the guide.
    • setWidth

      public void setWidth(float w)
      Sets the default line width for the guide.
    • getDash

      public float[] getDash()
      Gets the default dash settings for the guide (null for solid line).
    • setDash

      public void setDash(float[] d)
      Sets the default dash settings for the guide (null for solid line).
    • setEnabled

      public void setEnabled(boolean b)
      Sets the default enabled state for this guide.
      Overrides:
      setEnabled in class SettingDescriptor<GuideInfo>
      Parameters:
      b - true if this setting is enabled
    • supportsEditValue

      public boolean supportsEditValue()
    • setSupportsEditValue

      public void setSupportsEditValue(boolean b)
    • fromJson

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