Class PriceBarInfo

All Implemented Interfaces:
Cloneable

public class PriceBarInfo extends SeriesInfo
Describes how to display a series of price bars on a graph.
  • Constructor Details

    • PriceBarInfo

      public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, boolean enabled)
      Constructor.
      Parameters:
      type - type of price bar
      input - bar input for display a bar or line chart
      enabled - true if this path should be displayed
    • PriceBarInfo

      public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, boolean enabled)
      Constructor.
      Parameters:
      type - type of price bar
      input - bar input for display a bar or line chart
      fixedWidth - fixed width of the bar (null for auto width)
      enabled - true if this path should be displayed
    • PriceBarInfo

      public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, float lineWidth, float[] lineDash, boolean enabled)
      Constructor.
      Parameters:
      type - type of price bar
      input - bar input for display a bar or line chart
      fixedWidth - fixed width of the bar (null for auto width)
      lineColor - color for the line chart
      lineWidth - width of the line
      lineDash - dash pattern for the line
      enabled - true if this path should be displayed
    • PriceBarInfo

      public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] lineDash, boolean enabled)
      Constructor.
      Parameters:
      type - type of price bar
      input - bar input for display a bar or line chart
      fixedWidth - fixed width of the bar (null for auto width)
      lineColor - color for the line chart
      lineColor2 - secondary color for the line chart (used with the color policy)
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      lineWidth - width of the line
      lineDash - dash pattern for the line
      enabled - true if this path should be displayed
    • PriceBarInfo

      public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] lineDash, boolean enabled, boolean showTag, boolean showTagValue, String tag, Font font, Color tagTextColor, Color tagBgColor)
      Constructor.
      Parameters:
      type - type of price bar
      input - bar input for display a bar or line chart
      fixedWidth - fixed width of the bar (null for auto width)
      lineColor - color for the line chart
      lineColor2 - secondary color for the line chart (used with the color policy)
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      lineWidth - width of the line
      lineDash - dash pattern for the line
      enabled - true if this path should be displayed
    • PriceBarInfo

      public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, double gradientCenter, float strokeWidth, float[] dash, 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
      dash - dash style (null for solid line)
      maxPoints - max points to display
      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
      shadeType - type of shading for path
      width - width of the lines connecting the path points
      pointType - type of point to display
      pointSize - size of the 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.PriceBarType getType()
      Gets the type of price bar.
      Returns:
      type of price bar
    • getBarInput

      public Enums.BarInput getBarInput()
      Gets the bar input for displaying lines or bars.
      Returns:
      bar input
    • getLineColor

      public Color getLineColor()
      Gets the color for the line chart
    • getLineColor2

      public Color getLineColor2()
      Gets the secondary color for the line chart. This is used with the color policy.
    • getLineWidth

      public float getLineWidth()
      Gets the width of line for the line chart.
    • getLineDash

      public float[] getLineDash()
      Gets the dash for the line for the line chart.
    • setShowTag

      public PriceBarInfo 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 PriceBarInfo 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 PriceBarInfo 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 PriceBarInfo 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 PriceBarInfo fromJson(String str, PriceBarInfo def)