Class PathInfo

All Implemented Interfaces:
Cloneable

public class PathInfo extends SeriesInfo
Describes how to display a Path on a graph.
  • Constructor Details

    • PathInfo

      public PathInfo(Color c, float width, float[] dash, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor. Creates a path info for displaying a series of points connected by lines.
      Parameters:
      c - color of the path
      width - width of line used to connect the path points
      dash - dash style (null if solid line)
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if the path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed with of the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, float width, float[] dash, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor
      Parameters:
      c - primary path color
      c2 - secondary path color
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      width - width of the lines connecting the path points
      dash - dash style (null for solid line)
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, float width, float[] dash, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor
      Parameters:
      c - primary path color
      c2 - secondary path color
      c3 - tertiary path color
      c4 - quaternary path color
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      width - width of the lines connecting the path points
      dash - dash style (null for solid line)
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor.
      Parameters:
      c - color for lines that are trending upward
      c2 - color for lines that are trending downward
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor.
      Parameters:
      c - color for lines that are trending upward
      c2 - color for lines that are trending downward
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor.
      Parameters:
      c - primary path color
      c2 - secondary path color
      c3 - tertiary path color
      c4 - quaternary path color
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, float width, float[] dash, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor. Creates a path info for displaying the lines and points of the path.
      Parameters:
      c - color for lines that are trending upward
      c2 - color for lines that are trending downward
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      width - width of the lines connecting the path points
      dash - dash style (null for solid line)
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, float width, float[] dash, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth)
      Constructor. Creates a path info for displaying the lines and points of the path.
      Parameters:
      c - primary color
      c2 - secondary color
      c3 - tertiary color
      c4 - quaternary color
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      width - width of the lines connecting the path points
      dash - dash style (null for solid line)
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
    • PathInfo

      public PathInfo(Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, Double gradientCenter, Enums.ShadeType shadeType, float width, float[] dash, boolean showPath, boolean showPoints, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean allPoints, boolean enabled, boolean continuous, boolean showBars, int barCenter, Integer fixedWidth, boolean showTag, boolean showTagValue, String tag, Font tagFont, Color tagTextColor, Color tagBgColor)
      Constructor. Creates a path info for displaying the lines and points of the path.
      Parameters:
      c - primary color
      c2 - secondary color
      c3 - tertiary color
      c4 - quaternary color
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      width - width of the lines connecting the path points
      dash - dash style (null for solid line)
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display
      allPoints - true if all points should be displayed
      enabled - true if this path should be displayed
      continuous - true if this path is continuous even with missing values
      showBars - true if this path should be shown as bars
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
      showTag - true if the tag should be displayed
      showTagValue - true if the value should be displayed in the tag
      tag - text for the tag
      tagFont - font for the tag
      tagTextColor - color for the tag text (null for the path color)
      tagBgColor - color for the tag background (null for no background)
    • PathInfo

      public PathInfo(Enums.PathType type, Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, double gradientCenter, Enums.ShadeType shadeType, float strokeWidth, float[] dash, Enums.PointType pointType, Enums.Size pointSize, int maxPoints, boolean continuous, int barCenter, double fixedWidth, boolean showTag, boolean showTagValue, String tag, TextStyle tagStyle, boolean enabled)
      Constructor. Creates a path info for displaying the lines and points of the path.
      Parameters:
      c - primary color
      c2 - secondary color
      c3 - tertiary color
      c4 - quaternary color
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      shadeType - type of shading for path
      dash - dash style (null for solid line)
      pointType - type of point to display
      pointSize - size of the points
      maxPoints - max points to display (0 for all points)
      continuous - true if this path is continuous even with missing values
      barCenter - center point for drawing bars
      fixedWidth - fixed width for the bars
      showTag - true if the tag should be displayed
      showTagValue - true if the value should be displayed in the tag
      tag - text for the tag
      enabled - true if this path should be displayed
      width - width of the lines connecting the path points
      showBars - true if this path should be shown as bars
      tagFont - font for the tag
      tagTextColor - color for the tag text (null for the path color)
      tagBgColor - color for the tag background (null for no background)
  • Method Details

    • getType

      public Enums.PathType getType()
    • setColor

      public PathInfo setColor(Color color)
      Creates a copy of the object and sets main color of the path.
      Overrides:
      setColor in class SeriesInfo
      Parameters:
      color - main color
      Returns:
      copy of the object
    • setDash

      public PathInfo setDash(float[] dash)
      Creates a copy of the object and sets dash style
      Overrides:
      setDash in class SeriesInfo
      Parameters:
      dash - dash style
      Returns:
      copy of the object
    • setWidth

      public PathInfo setWidth(float width)
      Creates a copy of the object and sets the width of the lines connecting path points.
      Overrides:
      setWidth in class SeriesInfo
      Parameters:
      width - width of the path line
      Returns:
      copy of the object with the width set
    • isShowPoints

      public boolean isShowPoints()
      Indicates if the points should be displayed.
      Returns:
      true if the points should be drawn
    • isShowPath

      public boolean isShowPath()
      Indicates if the path lines should be shown.
      Returns:
      true if the path should be shown
    • getPointSize

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

      public Enums.PointType getPointType()
      Gets the type of the path points.
      Returns:
      the type of points to draw for the path points
    • getShadeType

      public Enums.ShadeType getShadeType()
      Indicates the shade type for shading above/below the path.
      Returns:
      shade type for shading above/below the path
    • isShowAsBars

      public boolean isShowAsBars()
      Indicates if the path should be shown as bars.
      Returns:
      true if the path should be shown as bars
    • getStroke

      public Stroke getStroke()
      Gets the stroke for drawing the path.
      Returns:
      the stroke used to draw the path
    • getSelectedStroke

      public Stroke getSelectedStroke()
      Gets the stroke for drawing the path when the study is selected.
      Returns:
      the stroke used to draw the path when it is selected
    • setShowTag

      public PathInfo setShowTag(boolean showTag)
      Creates a copy of the object and sets the showTag attribute.
      Overrides:
      setShowTag in class TagInfo
      Parameters:
      showTag - true if the tag should be displayed
      Returns:
      copy of the object
    • setShowTagValue

      public PathInfo setShowTagValue(boolean showTagValue)
      Creates a copy of the object and sets the showTagValue attribute.
      Overrides:
      setShowTagValue in class TagInfo
      Parameters:
      showTag - true if the tag value should be displayed
      Returns:
      copy of the object
    • setTag

      public PathInfo setTag(String tag)
      Creates a copy of the object and sets the tag attribute.
      Overrides:
      setTag in class TagInfo
      Parameters:
      tag - text to be displayed in the tag
      Returns:
      copy of the object
    • clone

      public PathInfo clone()
      Creates a clone (copy) of this object.
      Overrides:
      clone in class SeriesInfo
      Returns:
      clone of this object
    • toJson

      public Object toJson(BaseInfo def1)
      Overrides:
      toJson in class SeriesInfo
    • fromJson

      public static PathInfo fromJson(String str, PathInfo def)