Class PriceBarInfo
java.lang.Object
com.motivewave.platform.sdk.common.BaseInfo
com.motivewave.platform.sdk.common.TagInfo
com.motivewave.platform.sdk.common.SeriesInfo
com.motivewave.platform.sdk.common.PriceBarInfo
- All Implemented Interfaces:
Cloneable
Describes how to display a series of price bars on a graph.
-
Constructor Summary
ConstructorDescriptionPriceBarInfo
(Enums.PriceBarType type, Enums.BarInput input, boolean enabled) Constructor.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.PriceBarInfo
(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, boolean enabled) Constructor.PriceBarInfo
(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, float lineWidth, float[] lineDash, boolean enabled) Constructor.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.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. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a clone (copy) of this object.static PriceBarInfo
fromJson
(String str, PriceBarInfo def) Gets the bar input for displaying lines or bars.Gets the color for the line chartGets the secondary color for the line chart.float[]
Gets the dash for the line for the line chart.float
Gets the width of line for the line chart.getType()
Gets the type of price bar.setShowTag
(boolean showTag) Creates a copy of the object and sets the showTag attribute.setShowTagValue
(boolean showTagValue) Creates a copy of the object and sets the showTagValue attribute.Creates a copy of the object and sets the tag attribute.Methods inherited from class com.motivewave.platform.sdk.common.SeriesInfo
getBarCenter, getColor, getColor2, getColor3, getColor4, getColorPolicy, getDash, getFixedWidth, getFixedWidthDouble, getGradientCenter, getMaxPoints, getStrokeWidth, getWidth, isContinuous, isGradient, isShowAllPoints, setColor, setDash, setStrokeWidth, setWidth
Methods inherited from class com.motivewave.platform.sdk.common.TagInfo
getTag, getTagBgColor, getTagFont, getTagStyle, getTagTextColor, isShowTag, isShowTagValue, setTagBgColor, setTagTextColor
-
Constructor Details
-
PriceBarInfo
Constructor.- Parameters:
type
- type of price barinput
- bar input for display a bar or line chartenabled
- 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 barinput
- bar input for display a bar or line chartfixedWidth
- 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 barinput
- bar input for display a bar or line chartfixedWidth
- fixed width of the bar (null for auto width)lineColor
- color for the line chartlineWidth
- width of the linelineDash
- dash pattern for the lineenabled
- 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 barinput
- bar input for display a bar or line chartfixedWidth
- fixed width of the bar (null for auto width)lineColor
- color for the line chartlineColor2
- secondary color for the line chart (used with the color policy)colorPolicy
- policy for applying colors to the pathgradientCenter
- center point for the gradient, null if automaticlineWidth
- width of the linelineDash
- dash pattern for the lineenabled
- 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 barinput
- bar input for display a bar or line chartfixedWidth
- fixed width of the bar (null for auto width)lineColor
- color for the line chartlineColor2
- secondary color for the line chart (used with the color policy)colorPolicy
- policy for applying colors to the pathgradientCenter
- center point for the gradient, null if automaticlineWidth
- width of the linelineDash
- dash pattern for the lineenabled
- 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 colorc2
- secondary colorc3
- tertiary colorc4
- quaternary colorcolorPolicy
- policy for applying colors to the pathgradientCenter
- center point for the gradient, null if automaticdash
- dash style (null for solid line)maxPoints
- max points to displaycontinuous
- true if this path is continuous even with missing valuesbarCenter
- center point for drawing barsfixedWidth
- fixed width for the barsshowTag
- true if the tag should be displayedshowTagValue
- true if the value should be displayed in the tagtag
- text for the tagenabled
- true if this path should be displayedshadeType
- type of shading for pathwidth
- width of the lines connecting the path pointspointType
- type of point to displaypointSize
- size of the pointsshowBars
- true if this path should be shown as barstagFont
- font for the tagtagTextColor
- color for the tag text (null for the path color)tagBgColor
- color for the tag background (null for no background)
-
-
Method Details
-
getType
Gets the type of price bar.- Returns:
- type of price bar
-
getBarInput
Gets the bar input for displaying lines or bars.- Returns:
- bar input
-
getLineColor
Gets the color for the line chart -
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
Creates a copy of the object and sets the showTag attribute.- Overrides:
setShowTag
in classTagInfo
- Parameters:
showTag
- true if the tag should be displayed- Returns:
- copy of the object
-
setShowTagValue
Creates a copy of the object and sets the showTagValue attribute.- Overrides:
setShowTagValue
in classTagInfo
- Parameters:
showTag
- true if the tag value should be displayed- Returns:
- copy of the object
-
setTag
Creates a copy of the object and sets the tag attribute. -
clone
Creates a clone (copy) of this object.- Overrides:
clone
in classSeriesInfo
- Returns:
- clone of this object
-
toJson
- Overrides:
toJson
in classSeriesInfo
-
fromJson
-