Class PathDescriptor

java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor
com.motivewave.platform.sdk.common.desc.PathDescriptor

public class PathDescriptor extends SettingDescriptor
Describes a path. A path may be a connected line and/or a series of plotted points.
  • Constructor Details

    • PathDescriptor

      public PathDescriptor(String name, String label, Color color, float width, float[] dash)
      Constructor
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      color - default color of the path line
      width - default width of the path line
      dash - default dash value of the path line
    • PathDescriptor

      public PathDescriptor(String name, String label, Color color, float width, float[] dash, boolean enabled, boolean supportsMaxPoints, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      color - default color of the path line
      width - default width of the path line
      dash - default dash value of the path line
      enabled - true if the path is enabled by default
      supportsMaxPoints - true if the max points setting is allowed
      supportsDisable - true if the user can disable this path
    • PathDescriptor

      public PathDescriptor(String name, String label, Color color, float width, float[] dash, boolean enabled, boolean supportsColor2, boolean supportsMaxPoints, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      color - default color of the path line
      width - default width of the path line
      dash - default dash value of the path line
      enabled - true if the path is enabled by default
      supportsColor2 - true if a secondary color can be set for this path
      supportsMaxPoints - true if the max points setting is allowed
      supportsDisable - true if the user can disable this path
    • PathDescriptor

      public PathDescriptor(String name, String label, Color color, Enums.PointType type, Enums.Size size)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      color - default color of the path line
      type - type of point to be displayed
      size - size of the points
    • PathDescriptor

      public PathDescriptor(String name, String label, Color color, Enums.PointType type, Enums.Size size, boolean enabled, boolean supportsMaxPoints, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      color - default color of the path line
      type - type of point to be displayed
      size - size of the points
      enabled - true if the path is enabled by default
      supportsMaxPoints - true if the max points setting is allowed
      supportsDisable - true if the user can disable this path
    • PathDescriptor

      public PathDescriptor(String name, String label, PathInfo info, boolean enabled, boolean supportsTag, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      info - default path info
      enabled - true if the path is enabled by default
      supportsTag - true if a tag is supported
      supportsDisable - true if the user can disable this path
  • Method Details

    • setSupportsDisable

      public void setSupportsDisable(boolean b)
      Sets the supports disable attribute for the path. If true, the user can choose to disable this setting.
      Overrides:
      setSupportsDisable in class SettingDescriptor
      Parameters:
      b - true if supports disable is allowed
    • isSupportsTag

      public boolean isSupportsTag()
      Gets the supports tag attribute for the path. If true, the user can configure a tag for the path.
      Returns:
      true tags are supported
    • setSupportsTag

      public void setSupportsTag(boolean b)
      Sets the supports tag attribute for the path. If true, the user can configure a tag for the path.
      Parameters:
      b - true if the path supports a tag
    • getDefaultValue

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

      public float getWidth()
      Gets the default width of the path line.
      Returns:
      width of the path line.
    • setWidth

      public void setWidth(float w)
      Sets the default with of the path line.
      Parameters:
      w - width of the path line
    • getDash

      public float[] getDash()
      Gets the default dash setting for the path line (null for solid line).
      Returns:
      dash pattern for the path line (null for solid line).
    • setDash

      public void setDash(float[] dash)
      Sets the default dash setting for the path line (null for solid line).
      Parameters:
      dash - dash setting for the line
    • isShowPoints

      public boolean isShowPoints()
      Indicates if the points of the path should be shown by default.
      Returns:
      true if the points of the path should be shown
    • setShowPoints

      public void setShowPoints(boolean b)
      Sets the default 'show points' attribute.
      Parameters:
      b - true if the points of the path should be shown
    • isShowPath

      public boolean isShowPath()
      Indicates if the path line should be shown by default.
      Returns:
      true if the path line should be shown
    • setShowPath

      public void setShowPath(boolean b)
      Sets the default 'show path' attribute.
      Parameters:
      b - true if the path line should be drawn
    • getPointSize

      public Enums.Size getPointSize()
      Gets the default size of the path points.
      Returns:
      default size of the path points
    • setPointSize

      public void setPointSize(Enums.Size size)
      Sets the default size of the path points.
      Parameters:
      size - default size of the path points
    • getPointType

      public Enums.PointType getPointType()
      Gets the default type of point displayed for each value in the path.
      Returns:
      default type of point displayed for each value in the path
    • setPointType

      public void setPointType(Enums.PointType type)
      Sets the default type of point displayed for each value in the path.
      Parameters:
      type - default type of point to be displaed for each value in the path
    • getColor

      public Color getColor()
      Gets the default color of the path line/points.
      Returns:
      color of the path line/points
    • setColor

      public void setColor(Color c)
      Sets the default color for the path line and/or points.
      Parameters:
      c - color of the path line and/or points
    • getColor2

      public Color getColor2()
      Gets the default secondary color for the path line. This is displayed when the path is trending upwards.
      Returns:
      secondary color for the path line
    • setColor2

      public void setColor2(Color color)
      Sets the default secondary color for the path line. This is displayed when the path is trending upwards.
      Parameters:
      color - secondary color for the path
    • getColor3

      public Color getColor3()
      Gets the default tertiary color for the path line.
      Returns:
      tertiary color for the path line
    • setColor3

      public void setColor3(Color color)
      Sets the default tertiary color for the path line.
      Parameters:
      color - tertiary color for the path
    • getColor4

      public Color getColor4()
      Gets the default quaternary color for the path line.
      Returns:
      quaternary color for the path line
    • setColor4

      public void setColor4(Color color)
      Sets the default quaternary color for the path line.
      Parameters:
      color - quaternary color for the path
    • isSupportsColor2

      @Deprecated public boolean isSupportsColor2()
      Deprecated.
      use supportsColorPolicy instead
      Indicates if the secondary color is supported for this setting.
      Returns:
      true if the secondary color is supported
    • setSupportsColor2

      @Deprecated public void setSupportsColor2(boolean b)
      Deprecated.
      use supportsColorPolicy instead
      Indicates if the secondary color is supported for this setting.
      Parameters:
      b - true if the secondary color is supported
    • getColorPolicy

      public Enums.ColorPolicy getColorPolicy()
      Gets the color policy for this path. The color policy determines how the colors are applied to the path.
      Returns:
      the policy that determines how colors are applied to this path.
    • setColorPolicy

      public void setColorPolicy(Enums.ColorPolicy policy)
      Sets the color policy for this path. The color policy determines how the colors are applied to the path.
      Parameters:
      policy - color policy
    • getColorPolicies

      public Enums.ColorPolicy[] getColorPolicies()
      Gets the supported color policies for this path.
      Returns:
      return supported color policies
    • setColorPolicies

      public void setColorPolicies(Enums.ColorPolicy[] policies)
      Sets the supported color policies for this path.
      Parameters:
      policies - supported color policies
    • getShadeType

      public Enums.ShadeType getShadeType()
      Gets the shade type for this path. This determines if a shade is drawn above or below the path (not applicable to bars).
    • setShadeType

      public void setShadeType(Enums.ShadeType shadeType)
      sets the shade type for this path. This determines if a shade is drawn above or below the path (not applicable to bars).
      Parameters:
      shadeType - type of shade
    • getShadeTypes

      public Enums.ShadeType[] getShadeTypes()
      Gets the supported shade types for this path.
      Returns:
      return supported shade types
    • setShadeTypes

      public void setShadeTypes(Enums.ShadeType[] shadeTypes)
      Sets the supported shade types for this path.
      Parameters:
      shadeTypes - supported shade types
    • isShowAllPoints

      public boolean isShowAllPoints()
      Indicates if all points on the path should be shown by default.
      Returns:
      true if all path points should be shown
    • setShowAllPoints

      public void setShowAllPoints(boolean b)
      Sets the default show all points value.
      Parameters:
      b - true if all path points should be shown
    • isShowAsBars

      public boolean isShowAsBars()
      Indicates if all path should be show as bars by default.
      Returns:
      true if the path should be shown as a series of bars
    • setShowAsBars

      public void setShowAsBars(boolean b)
      Sets the default show as bars value.
      Parameters:
      b - true if the path should be shown as a series of bars
    • getBarCenter

      public int getBarCenter()
      Gets the center point for drawing bars (positive/negative bars).
      Returns:
      center point for drawing bars
    • setBarCenter

      public void setBarCenter(int c)
      Sets the center point for drawing bars (positive/negative bars).
      Parameters:
      c - center point for drawing bars
    • getFixedWidth

      public Integer getFixedWidth()
      Gets the fixed width for displaying bars (null for dynamic width).
      Returns:
      fixed width for displaying bars
    • setFixedWidth

      public void setFixedWidth(Integer width)
      Sets the fixed width for displaying bars (null for dynamic width).
      Parameters:
      width - fixed width for displaying bars
    • getMaxPoints

      public int getMaxPoints()
      Gets the default maximum number of points to display for the path.
      Returns:
      maximum number of points to display for the path
    • setMaxPoints

      public void setMaxPoints(int max)
      Sets the default maximum number of points to display for the path.
      Parameters:
      max - maximum number of points to display
    • isSupportsMaxPoints

      public boolean isSupportsMaxPoints()
      Determines if the max points attribute is supported for this setting.
      Returns:
      true if max points is supported
    • setSupportsMaxPoints

      public void setSupportsMaxPoints(boolean b)
      Determines if the max points attribute is supported for this setting.
      Parameters:
      b - true if max points is supported
    • isSupportsColor

      public boolean isSupportsColor()
      Determines if the user is allowed to set color(s) for the path.
      Returns:
      true if user is allowed to set color(s)
    • setSupportsColor

      public void setSupportsColor(boolean b)
      Determines if the user is allowed to set color(s) for the path.
      Parameters:
      b - true if user is allowed to set color(s)
    • isSupportsColorPolicy

      public boolean isSupportsColorPolicy()
      Determines if the user is allowed to choose the color policy.
      Returns:
      true if user is allowed to choose the color policy
    • setSupportsColorPolicy

      public void setSupportsColorPolicy(boolean b)
      Determines if the user is allowed to choose the color policy.
      Parameters:
      b - true if user is allowed to choose the color policy
    • isSupportsShadeType

      public boolean isSupportsShadeType()
      Determines if the user is allowed to choose the shade type for the path.
      Returns:
      true if user is allowed to choose the shade type
    • setSupportsShadeType

      public void setSupportsShadeType(boolean b)
      Determines if the user is allowed to choose the shade type for the path.
      Parameters:
      b - true if user is allowed to choose the shade type
    • isSupportsShowPoints

      public boolean isSupportsShowPoints()
      Determines if the show points attribute is supported for this setting.
      Returns:
      true if the path can be displayed with points
    • setSupportsShowPoints

      public void setSupportsShowPoints(boolean b)
      Determines if the show points attribute is supported for this setting.
      Parameters:
      b - true if the show points attribute is supported
    • isSupportsShowAsBars

      public boolean isSupportsShowAsBars()
      Determines if the path can optionally be shown as bars.
      Returns:
      true if this path can be shown as bars
    • setSupportsShowAsBars

      public void setSupportsShowAsBars(boolean b)
      Determines if the path can optionally be shown as bars.
      Parameters:
      b - true if the path can be shown as bars
    • isSupportsAdvancedPanel

      public boolean isSupportsAdvancedPanel()
      Indicates if the advanced settings panel is supported for this setting.
      Returns:
      true if the advanced panel is supported.
    • setSupportsAdvancedPanel

      public void setSupportsAdvancedPanel(boolean b)
      Indicates if the advanced settings panel is supported for this setting.
      Parameters:
      b - true if the user can see the advanced path
    • isSupportsBoth

      public boolean isSupportsBoth()
      Indicates if both path line and path points are supported at the same time.
      Returns:
      true if both the path line and path points are supported at the same time.
    • setSupportsBoth

      public void setSupportsBoth(boolean b)
      Indicates if both the path line and path points are supported at the same time.
      Parameters:
      b - true if both the path line and path points are supported at the same time.
    • isContinuous

      public boolean isContinuous()
      Indicates if both path line is continuous even if values are missing.
      Returns:
      true if the path line is continuous when there are values missing
    • setContinuous

      public void setContinuous(boolean b)
      Sets the continuous option for the path.
      Parameters:
      b - true if the path line is continuous when there are values missing
    • isGradient

      @Deprecated public boolean isGradient()
      Deprecated.
      user color policy instead
      Indicates colors are part of a gradient (color and color2 must be defined).
      Returns:
      true if the colors are part of a gradient
    • setGradient

      @Deprecated public void setGradient(boolean b)
      Deprecated.
      use color policy instead
      Indicates colors are part of a gradient (color and color2 must be defined).
      Parameters:
      b - true if the colors are part of a gradient
    • getGradientCenter

      public Double getGradientCenter()
      Gets the center point for the gradient (null if automatic).
      Returns:
      the center point for the gradient
    • setGradientCenter

      public void setGradientCenter(Double center)
      Sets the center point for the gradient (null if automatic).
      Parameters:
      center - center point for the gradient
    • isDisplaySetting

      public boolean isDisplaySetting()
      Description copied from class: SettingDescriptor
      Indicates if this setting is used to affect the appearance of the of the study/strategy
      Overrides:
      isDisplaySetting in class SettingDescriptor
      Returns:
      true if this setting affects the appearance of the study/strategy
    • isOverrideTagDisplay

      public boolean isOverrideTagDisplay()
      Returns:
      true if the study will render the tag.
    • setOverrideTagDisplay

      public void setOverrideTagDisplay(boolean b)
      Sets the override tag display option. If true, the study will display the tag and the framework will ignore the tag settings.
      Parameters:
      b - true to override the display behavior for the tag.