Class PriceBarDescriptor
java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<PriceBarInfo>
com.motivewave.platform.sdk.common.desc.PriceBarDescriptor
Describes a price bar.
-
Constructor Summary
ConstructorDescriptionPriceBarDescriptor
(String name, String label, Enums.PriceBarType type, Enums.BarInput input, boolean enabled, boolean supportsDisable) Constructor.PriceBarDescriptor
(String name, String label, Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, boolean enabled, boolean supportsDisable) Constructor.PriceBarDescriptor
(String name, String label, Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] dash, boolean enabled, boolean supportsDisable) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.Node
createInputFX
(Settings settings, boolean readOnly) Creates the component that will accept the user input.Gets the supported color policies for this path.Gets the default value for this setting.boolean
Indicates if this setting is used to affect the appearance of the of the study/strategyboolean
Determines if the user is allowed to choose the color policy.boolean
Gets the supports tag attribute for the path.void
setColorPolicies
(Enums.ColorPolicy[] policies) Sets the supported color policies for this path.void
setSupportsTag
(boolean b) Sets the supports tag attribute for the path.Methods inherited from class com.motivewave.platform.sdk.common.desc.SettingDescriptor
createInput, createTBInput, getDescription, getGridWidth, getHelpLink, getIconFactory, getId, getLabel, getName, isAllowUserDefaults, isEnabled, isShowLabel, isSupportsDisable, setAllowUserDefaults, setDefaultValue, setDescription, setEnabled, setGridWidth, setHelpLink, setIconFactory, setShowLabel, setSupportsDisable
-
Constructor Details
-
PriceBarDescriptor
public PriceBarDescriptor(String name, String label, Enums.PriceBarType type, Enums.BarInput input, boolean enabled, boolean supportsDisable) Constructor.- Parameters:
name
- name of the setting (key)label
- label displayed to the usertype
- type of price barenabled
- true if the path is enabled by defaultsupportsDisable
- true if the user can disable this price bar
-
PriceBarDescriptor
public PriceBarDescriptor(String name, String label, Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, boolean enabled, boolean supportsDisable) Constructor.- Parameters:
name
- name of the setting (key)label
- label displayed to the usertype
- type of price barfixedWidth
- fixed width of the bar (null for auto width)enabled
- true if the path is enabled by defaultsupportsDisable
- true if the user can disable this price bar
-
PriceBarDescriptor
public PriceBarDescriptor(String name, String label, Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] dash, boolean enabled, boolean supportsDisable) Constructor.- Parameters:
name
- name of the setting (key)label
- label displayed to the usertype
- type of price barfixedWidth
- 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 lineenabled
- true if the path is enabled by defaultsupportsDisable
- true if the user can disable this price barlineDash
- dash pattern for the line
-
-
Method Details
-
getDefaultValue
Gets the default value for this setting.- Overrides:
getDefaultValue
in classSettingDescriptor<PriceBarInfo>
- Returns:
- default value for the setting
-
createInputFX
Description copied from class:SettingDescriptor
Creates the component that will accept the user input. This is called by the study framework.- Specified by:
createInputFX
in classSettingDescriptor<PriceBarInfo>
- Parameters:
settings
- settings for the studyreadOnly
- true if the component should not accept user input- Returns:
- component that will accept user input.
-
isSupportsColorPolicy
public boolean isSupportsColorPolicy()Determines if the user is allowed to choose the color policy.- Returns:
- true if user is allowed to choose the color policy
-
getColorPolicies
Gets the supported color policies for this path.- Returns:
- return supported color policies
-
setColorPolicies
Sets the supported color policies for this path.- Parameters:
policies
- supported color policies
-
isSupportsTag
public boolean isSupportsTag()Gets the supports tag attribute for the path. If true, the user can configure a tag for the path.- Returns:
- true tags are supported
-
setSupportsTag
public void setSupportsTag(boolean b) Sets the supports tag attribute for the path. If true, the user can configure a tag for the path.- Parameters:
b
- true if the path supports a tag
-
isDisplaySetting
public boolean isDisplaySetting()Description copied from class:SettingDescriptor
Indicates if this setting is used to affect the appearance of the of the study/strategy- Overrides:
isDisplaySetting
in classSettingDescriptor<PriceBarInfo>
- Returns:
- true if this setting affects the appearance of the study/strategy
-
fromJson
- Overrides:
fromJson
in classSettingDescriptor<PriceBarInfo>
-