Class IndicatorInfo
java.lang.Object
com.motivewave.platform.sdk.common.BaseInfo
com.motivewave.platform.sdk.common.TagInfo
com.motivewave.platform.sdk.common.IndicatorInfo
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
GuideInfo
Encapsulates configuration information for indicators that are displayed on the Price Axis (for overlays) or
on the value axis (study graphs).
-
Field Summary
-
Constructor Summary
ConstructorDescriptionIndicatorInfo
(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) Constructs an Indicator Info.IndicatorInfo
(String id, Color lblColor, Color textColor, boolean showLine, boolean enabled) Constructs an Indicator Info.IndicatorInfo
(String id, Color lblColor, Color textColor, Color outlineColor, boolean outlineEnabled, Font font, boolean top, boolean showLabel, Color lineColor, float lineWidth, float[] lineDash, boolean showLine, boolean showTag, String tag, Color tagTextColor, Color tagBgColor, boolean enabled) Constructs an Indicator Info. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a clone (copy) of this object.static IndicatorInfo
fromJson
(String str, IndicatorInfo def) getFont()
Gets the font the indicator label and tag.getId()
Gets the name (id) of this indicator.getLabel()
Gets the label of this indicator.Gets the background color for the indicator.Gets the color for the line.float[]
Gets the dash style for the indicator line.float
Gets the width of the indicator line.getName()
Deprecated.use getId() insteadGets the outline color for the indicator.Gets the text color for the indicator.boolean
boolean
Indicates if this indicator label should be shown.boolean
Indicates if this indicator should show a horizontal line.boolean
isTop()
boolean
Creates a copy of the object and sets the label color.Creates a copy of the object and sets the text color.Methods inherited from class com.motivewave.platform.sdk.common.TagInfo
getTag, getTagBgColor, getTagFont, getTagStyle, getTagTextColor, isShowTag, isShowTagValue, setShowTag, setShowTagValue, setTag, setTagBgColor, setTagTextColor
-
Field Details
-
id
-
label
-
labelColor
-
textColor
-
lineColor
-
outlineColor
-
font
-
showLine
protected boolean showLine -
showLabel
protected boolean showLabel -
top
protected boolean top -
showOutline
protected boolean showOutline -
lineWidth
protected float lineWidth -
lineDash
protected float[] lineDash -
lineStroke
-
-
Constructor Details
-
IndicatorInfo
Constructs an Indicator Info.- Parameters:
id
- - name (identifier)lblColor
- - Background colortextColor
- - Text colorshowLine
- - true if a vertical line should be shown with the indicator.enabled
- - true if this indicator should be displayed.
-
IndicatorInfo
public IndicatorInfo(String id, Color lblColor, Color textColor, Color outlineColor, boolean outlineEnabled, Font font, boolean top, boolean showLabel, Color lineColor, float lineWidth, float[] lineDash, boolean showLine, boolean showTag, String tag, Color tagTextColor, Color tagBgColor, boolean enabled) Constructs an Indicator Info.- Parameters:
id
- - name (identifier)lblColor
- - Background (Indicator Label) colortextColor
- - Text coloroutlineColor
- - Outline Color for the labeloutlineEnabled
- - true if the label outline should be drawnfont
- - Indicator Fonttop
- - true if the indicator label should be shown on topshowLabel
- - true if the indicator label should be shownlineColor
- - Line ColorlineWidth
- - Width of the Indicator LinelineDash
- - Dash style of the Indicator Line (null for solid line)showLine
- - true if a vertical line should be shown with the indicator.showTag
- - true if the tag should be shown next to the labeltag
- - descriptive tagtagTextColor
- text color for the tagtagBgColor
- color for the tag backgroundenabled
- - true if this indicator should be displayed.
-
IndicatorInfo
public IndicatorInfo(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) Constructs an Indicator Info.- Parameters:
id
- - name (identifier)showLine
- - true if a vertical line should be shown with the indicator.lineWidth
- - Width of the Indicator LinelineDash
- - Dash style of the Indicator Line (null for solid line)lineColor
- - Line ColorshowTag
- - true if the tag should be shown next to the labeltag
- - descriptive tagshowLabel
- - true if the indicator label should be shownoutlineColor
- - Outline Color for the labeltextColor
- - Text colorlblColor
- - Background (Indicator Label) colortop
- - true if the indicator label should be shown on topenabled
- - true if this indicator should be displayed.outlineEnabled
- - true if the label outline should be drawnfont
- - Indicator FonttagTextColor
- text color for the tagtagBgColor
- color for the tag background
-
-
Method Details
-
getId
Gets the name (id) of this indicator.- Returns:
- name of the indicator
-
getName
Deprecated.use getId() insteadGets the name (id) of this indicator.- Returns:
- name of the indicator
-
getLabel
Gets the label of this indicator.- Returns:
- name of the indicator
-
isShowLabel
public boolean isShowLabel()Indicates if this indicator label should be shown.- Returns:
- true if the indicator label is visible
-
getLabelColor
Gets the background color for the indicator.- Returns:
- background color for the indicator
-
setLabelColor
Creates a copy of the object and sets the label color.- Parameters:
c
- color of the label- Returns:
- copy of the object with the label color set
-
getTextColor
Gets the text color for the indicator.- Returns:
- text color for the indicator
-
setTextColor
Creates a copy of the object and sets the text color.- Parameters:
c
- color of the text- Returns:
- copy of the object with the text color set
-
getOutlineColor
Gets the outline color for the indicator.- Returns:
- outline color for the indicator
-
isOutlineEnabled
public boolean isOutlineEnabled()- Returns:
- true of the outline color should be used
-
getLineColor
Gets the color for the line.- Returns:
- color for the line
-
isShowLine
public boolean isShowLine()Indicates if this indicator should show a horizontal line.- Returns:
- true if a line should drawn with this indicator
-
getLineDash
public float[] getLineDash()Gets the dash style for the indicator line.- Returns:
- dash style
-
getLineWidth
public float getLineWidth()Gets the width of the indicator line.- Returns:
- the with of the indicator line
-
getFont
Gets the font the indicator label and tag.- Returns:
- font
-
isUseDefaultFont
public boolean isUseDefaultFont()- Returns:
- true if the default font should be used.
-
isTop
public boolean isTop() -
getLineStroke
-
clone
Creates a clone (copy) of this object. -
toJson
-
fromJson
-