public class Plot
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT
Default plot for studies that are not overlays.
|
static java.lang.String |
PRICE
Plot for the Price Graph.
|
Constructor and Description |
---|
Plot() |
Modifier and Type | Method and Description |
---|---|
void |
addHorizontalLine(LineInfo info)
Adds a horizontal line to the graph using the information defined in LineInfo.
|
Plot |
clone()
Creates a clone (copy) of this object.
|
void |
declareBars(java.lang.Object valueKey)
Declare bar sequence using the default settings for drawing bars.
|
void |
declareBars(java.lang.Object valueKey,
java.lang.String settingsKey)
Declare a bar sequence associated with the given value key.
|
void |
declareGuide(java.lang.String settingsKey)
Declare a guide to be displayed on this plot.
|
void |
declareIndicator(java.lang.Object valueKey,
java.lang.String indicatorKey)
Associates a value key to an indicator.
|
void |
declarePath(java.lang.Object valueKey,
java.lang.String pathSettingsKey)
Declare a path associated with the given value key.
|
java.util.Map<java.lang.Object,java.lang.String> |
getBars()
Gets the set of declared bars (a map of value key to settings key).
|
int |
getBottomInsetPixels()
Gets the bottom inset for the graph (in pixels).
|
java.lang.Integer |
getFixedBottomValue()
Gets the 'fixed' bottom value (null if not defined).
|
java.lang.Integer |
getFixedTopValue()
Gets the 'fixed' top value (null if not defined).
|
java.util.Set<java.lang.String> |
getGuides()
Gets the set of declared guides (a map of value key to settings key).
|
java.util.List<LineInfo> |
getHorizontalLines()
Gets the list of horizontal lines declared for this plot.
|
java.util.List<java.lang.String> |
getIDSettings()
Gets the set of settings that are part of the ID for the plot.
|
java.util.Map<java.lang.Object,java.lang.String> |
getIndicators()
Gets the set of declared indicators (a map of value key to settings key).
|
java.lang.String |
getLabelPrefix()
Gets the label prefix.
|
java.util.List<java.lang.String> |
getLabelSettings()
Gets the set of settings that are part of the label for the plot.
|
java.lang.Integer |
getMaxBottomValue()
Gets the 'maximum' bottom value (null if not defined).
|
java.lang.Double |
getMinTick()
Gets the minimum tick value for the vertical axis (if this is not an overlay).
|
java.lang.Integer |
getMinTopValue()
Gets the 'minimum' top value (null if not defined).
|
java.lang.String |
getName()
Gets the name of this plot (human readable).
|
java.util.Map<java.lang.Object,java.lang.String> |
getPaths()
Gets the set of declared paths (a map of value key to settings key).
|
java.util.List<java.lang.Object> |
getRangeKeys()
Gets the keys of the values used to affect the vertical range of the plot.
|
java.lang.String |
getTabName()
Gets the name to display in the tab for this plot.
|
int |
getTopInsetPixels()
Gets the top inset for the graph (in pixels).
|
boolean |
isAllowDisable()
Determines if the user is allowed to disable (hide) this plot.
|
boolean |
isAllowInsetModification()
Determines if the user is allowed to modify insets for this study (non-overlays only, true by default).
|
boolean |
isEnabled()
Determines if this plot is enabled.
|
boolean |
isFormatMK()
Determines if this study allows formatting values using shortened versions (ie: 10000 is 10K, 10000000 is 10M).
|
boolean |
isShowLabel()
Determins if the labe should be shown for this plot.
|
void |
setAllowDisable(boolean b)
Sets the the ability for the user to disable (hide) this plot.
|
void |
setAllowInsetModification(boolean b)
Sets the flag for determining if the user can modify the insets for this study (non-overlays only).
|
void |
setBottomInsetPixels(int pixels)
Sets the bottom inset for the graph (in pixels).
|
void |
setEnabled(boolean b)
Sets the flag for enabling this plot.
|
void |
setFixedBottomValue(java.lang.Integer value)
Sets the 'fixed' bottom value (null if not defined).
|
void |
setFixedTopValue(java.lang.Integer value)
Sets the 'fixed' top value (null if not defined).
|
void |
setFormatMK(boolean b)
Sets the flag for formatting shortened version of values (ie: 10000 is 10K, 10000000 is 10M).
|
void |
setIDSettings(java.lang.String... vals)
Use this method to identify which settings should be part of the plot identifier.
|
void |
setLabelPrefix(java.lang.String label)
Sets the label prefix for this plot.
|
void |
setLabelSettings(java.lang.String... vals)
Use this method to identify which settings should be part of the plot label (and to identify the study).
|
void |
setMaxBottomValue(java.lang.Integer value)
Sets the 'maximum' bottom value (null if not defined).
|
void |
setMinTick(java.lang.Double minTick)
Sets the minimum tick for the vertical axis (if this is not an overlay).
|
void |
setMinTopValue(java.lang.Integer value)
Sets the 'minimum' top value (null if not defined).
|
void |
setName(java.lang.String name)
Sets the name of this plot (human readable).
|
void |
setRangeKeys(java.lang.Object... keys)
Use this method to identify the numeric values generated by
this study that are to affect the vertical range of the plot
(when auto scale is turned on).
|
void |
setShowLabel(boolean b)
Sets the flag for showing the label for this plot.
|
void |
setTabName(java.lang.String name)
Sets the name to display in the tab for this plot.
|
void |
setTopInsetPixels(int pixels)
Sets the top inset for the graph (in pixels).
|
public static final java.lang.String PRICE
public static final java.lang.String DEFAULT
public java.lang.String getName()
public void setName(java.lang.String name)
name
- name of this plotpublic java.lang.String getLabelPrefix()
public void setLabelPrefix(java.lang.String label)
label
- label prefixpublic void setLabelSettings(java.lang.String... vals)
vals
- label setting valuespublic java.util.List<java.lang.String> getLabelSettings()
public void setIDSettings(java.lang.String... vals)
vals
- ID setting valuespublic java.util.List<java.lang.String> getIDSettings()
public java.lang.String getTabName()
public void setTabName(java.lang.String name)
name
- tab namepublic boolean isShowLabel()
public void setShowLabel(boolean b)
b
- true if the label should be shownpublic void setRangeKeys(java.lang.Object... keys)
keys
- range keyspublic java.util.List<java.lang.Object> getRangeKeys()
public void declarePath(java.lang.Object valueKey, java.lang.String pathSettingsKey)
valueKey
- key of the series of values for the pathpathSettingsKey
- settings key of the pathpublic void declareIndicator(java.lang.Object valueKey, java.lang.String indicatorKey)
valueKey
- key of the value for the indicatorindicatorKey
- settings key for the indicatorpublic void declareBars(java.lang.Object valueKey, java.lang.String settingsKey)
valueKey
- key of the series of values for the barssettingsKey
- settings key for the barspublic void declareBars(java.lang.Object valueKey)
valueKey
- key of the series of values for the barspublic void declareGuide(java.lang.String settingsKey)
settingsKey
- setting key for the guidepublic void addHorizontalLine(LineInfo info)
info
- line info objectpublic int getTopInsetPixels()
public void setTopInsetPixels(int pixels)
pixels
- pixels for the top insetpublic int getBottomInsetPixels()
public void setBottomInsetPixels(int pixels)
pixels
- pixels for the bottom insetpublic java.lang.Integer getFixedBottomValue()
public void setFixedBottomValue(java.lang.Integer value)
value
- fixed bottom valuepublic java.lang.Integer getFixedTopValue()
public void setFixedTopValue(java.lang.Integer value)
value
- fixed top valuepublic java.lang.Integer getMaxBottomValue()
public void setMaxBottomValue(java.lang.Integer value)
value
- maximum bottom valuepublic java.lang.Integer getMinTopValue()
public void setMinTopValue(java.lang.Integer value)
value
- minimum top valuepublic java.lang.Double getMinTick()
public void setMinTick(java.lang.Double minTick)
minTick
- minimum tickpublic java.util.List<LineInfo> getHorizontalLines()
public java.util.Map<java.lang.Object,java.lang.String> getPaths()
public java.util.Map<java.lang.Object,java.lang.String> getIndicators()
public java.util.Map<java.lang.Object,java.lang.String> getBars()
public java.util.Set<java.lang.String> getGuides()
public boolean isFormatMK()
public void setFormatMK(boolean b)
b
- true if MK formatting should be usedpublic boolean isAllowInsetModification()
public void setAllowInsetModification(boolean b)
b
- true if the use can modify insets.public boolean isAllowDisable()
public void setAllowDisable(boolean b)
b
- true if the user is allowed to disable this plot.public boolean isEnabled()
public void setEnabled(boolean b)
b
- true if this plot is enabledpublic Plot clone()
clone
in class java.lang.Object