Class GuideInfo

All Implemented Interfaces:
Cloneable

public class GuideInfo extends IndicatorInfo
Describes a guide.
  • Constructor Details

    • GuideInfo

      public GuideInfo(double value, Color lineColor, Color labelColor, Color textColor, float width, float[] dash, boolean showLine, boolean showIndicator, boolean enabled)
      Constructor.
      Parameters:
      value - guide value (price or study value)
      lineColor - color for the guide line
      labelColor - background color for the label
      textColor - text color displayed in the label
      width - width of the guide line
      dash - dash pattern for the line (null if no dash)
      showLine - true if the line should be displayed
      showIndicator - true if the indicator label should be displayed
      enabled - true if enabled
    • GuideInfo

      public GuideInfo(double value, String id, boolean showLine, float lineWidth, float[] lineDash, Color lineColor, boolean showTag, String tag, TextStyle tagStyle, boolean showLabel, String label, Font labelFont, boolean showOutline, Color outlineColor, Color textColor, Color lblColor, boolean top, boolean enabled)
  • Method Details

    • getValue

      public double getValue()
      Gets the y-value where the guide will be displayed
      Returns:
      y-value
    • getDash

      public float[] getDash()
      Gets the dash style for drawing the guide line
      Returns:
      Gets the dash style for drawing the guide line
    • getWidth

      public float getWidth()
      Gets the line width for drawing the guide line
      Returns:
      Gets the line width for drawing the guide line
    • isShowIndicator

      public boolean isShowIndicator()
      Determines if the indicator should be shown for the guide
      Returns:
      true if the guide indicator should be shown
    • getStroke

      public Stroke getStroke()
      Gets the stroke for drawing the guide.
      Returns:
      stroke for drawing the guide
    • getSelectedStroke

      public Stroke getSelectedStroke()
      Gets the stroke for drawing the guide when the study is selected.
      Returns:
      stroke to be used when the guide is selected
    • clone

      public GuideInfo clone()
      Creates a clone (copy) of this object.
      Overrides:
      clone in class IndicatorInfo
      Returns:
      clone of this object
    • toString

      public String toString()
      Overrides:
      toString in class BaseInfo
    • toJson

      public Object toJson(BaseInfo def)
      Overrides:
      toJson in class IndicatorInfo
    • fromJson

      public static GuideInfo fromJson(String str, GuideInfo def)