Class ShadeInfo

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

public class ShadeInfo extends BaseInfo
Describes shading information between two lines described by lineKey1 and lineKey2.
  • Constructor Details

    • ShadeInfo

      public ShadeInfo(String lineKey1, double value, Enums.ShadeType type, Color color, boolean enabled)
      Constructor.
      Parameters:
      lineKey1 - identifies the line for shading
      value - shade value
      type - type of shade (above, below, both)
      color - shade color
      enabled - true if this shade is enabled
    • ShadeInfo

      public ShadeInfo(String lineKey1, String lineKey2, Enums.ShadeType type, Color color, boolean enabled)
      Constructor.
      Parameters:
      lineKey1 - identifies the first line/path for shading
      lineKey2 - identifies the second line/path for shading
      type - type of shade (above, below, both)
      color - shade color
      enabled - true if this shade is enabled
    • ShadeInfo

      public ShadeInfo(String[][] linePairs, Color color, boolean enabled)
      Constructor.
      Parameters:
      linePairs - set of line pairs for the shading (ShadeType.BOTH)
      color - shade color
      enabled - true if this shade is enabled
    • ShadeInfo

      public ShadeInfo(String lineKey1, String lineKey2, double value, Enums.ShadeType type, Color color, boolean enabled)
      Constructor.
      Parameters:
      lineKey1 - identifies the first line/path for shading
      lineKey2 - identifies the second line/path for shading
      value - shade value
      type - type of shade (above, below, both)
      color - shade color
      enabled - true if this shade is enabled
  • Method Details

    • getColor

      public Color getColor()
      Gets the color used for drawing the shade.
      Returns:
      color used to draw the shade
    • getLineKey1

      public String getLineKey1()
      Gets the key for the first line/path.
      Returns:
      key for the first line/path
    • getLineKey2

      public String getLineKey2()
      Gets the key for the second line/path.
      Returns:
      key for the second line/path
    • getLinePairs

      public String[][] getLinePairs()
      Gets the set of line pairs for applying this shade to multiple line pairs (shade type BOTH only)
      Returns:
      line pairs for applying the shade
    • getShadeType

      public Enums.ShadeType getShadeType()
      Gets the key pairs for drawing multiple shades public String[] getLinePairs() { return linePairs; } /** Gets the type of shade (above, below, both).
      Returns:
      type of shade
    • getValue

      public double getValue()
      Gets the absolute value for determining the shade area.
      Returns:
      absolute value for determining the shade area
    • clone

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

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

      public static ShadeInfo fromJson(Object json, ShadeInfo def)