Class LineInfo

java.lang.Object
com.motivewave.platform.sdk.common.BaseInfo
com.motivewave.platform.sdk.common.LineInfo
All Implemented Interfaces:
Cloneable

public class LineInfo extends BaseInfo
Describes a horizontal line that is to be displayed in a Study.
  • Constructor Details

    • LineInfo

      public LineInfo(Color lineColor)
      Constructor.
      Parameters:
      lineColor - color of the line
      value - y value for the horizontal line
      width - width of the line
      dash - dash style (null for solid line)
    • LineInfo

      public LineInfo(double value, Color lineColor, float width, float[] dash)
      Constructor.
      Parameters:
      value - y value for the horizontal line
      lineColor - color of the line
      width - width of the line
      dash - dash style (null for solid line)
    • LineInfo

      public LineInfo(double value, Color lineColor, float width, float[] dash, boolean enabled)
      Constructor.
      Parameters:
      value - y value for the horizontal line
      lineColor - color of the line
      width - width of the line
      dash - dash style (null for solid line)
    • LineInfo

      public LineInfo(Color lineColor, float width, float[] dash, boolean enabled)
      Constructor.
      Parameters:
      lineColor - color of the line
      width - width of the line
      dash - dash style (null for solid line)
      enabled - true if this line is enabled
  • Method Details

    • getValue

      public double getValue()
      Gets the y value (real value) for drawing this line.
      Returns:
      the y value (real value) for drawing this line.
    • getLineColor

      public Color getLineColor()
      Gets the color of the line (null if default line color)
      Returns:
      the color of the line (null if default line color)
    • getDash

      public float[] getDash()
      Gets the dash style for the line (null for a solid line)
      Returns:
      the dash style for the line (null for a solid line)
    • getWidth

      public float getWidth()
      Gets the width of the line (null for a solid line)
      Returns:
      the width of the line (null for a solid line)
    • getStroke

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

      public Stroke getSelectedStroke()
      Gets the stroke for drawing the line when the study is selected.
      Returns:
      stroke used to draw the line when it is selected by the user
    • clone

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

      public String toString()
      Gets string representation of this LineInfo object
      Overrides:
      toString in class BaseInfo
      Returns:
      string representation
    • toJson

      public Object toJson(BaseInfo def1)
      Specified by:
      toJson in class BaseInfo
    • fromJson

      public static LineInfo fromJson(Object obj, LineInfo def)