Class SettingsBase
java.lang.Object
com.motivewave.platform.sdk.common.SettingsBase
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
Settings
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Adds a property change listener.protected void
clone()
Creates a clone (copy) of this object.boolean
Compares this settings object with the given object and returns true if they are equal.void
<T> T
<T> T
Gets the bar info associated to the given id.getBarSize
(String id) Gets the bar size associated to the given id.Gets the color associated to the given id.Gets the color associated to the given id.getColorInfo
(String id) Gets the color info object associated to the given idGets the SettingsDescriptor object that describes the user settings.Gets the double value associated to the given id.double
Gets the double value associated to the given id.<T> T
<T> T
com.motivewave.platform.sdk2.common.EnumInfo
getEnumInfo
(String id) Gets the file associated with the given id.Gets the font associated with the given id.Gets the GuideInfo associated to the given idgetIndicator
(String id) Gets the indicator associated with the given idGets the input associated to the given id.Gets the input key associated to the given id.getInstrument
(String id) Gets the instrument associated to the given idint
Gets the int value associated to the given id (zero if not set).int
Gets the int value associated to the given id.getInteger
(String id) Gets the integer value associated to the given id.int
getInteger
(String id, int def) Gets the integer value associated to the given id.Gets the long value associated to the given id.getMAMethod
(String id) Gets the Moving Average Calculation method associated to the given idgetMAMethod
(String id, Enums.MAMethod def) Gets the Moving Average Calculation method associated to the given id.Gets the MarkerInfo object associated with the given idGets the PathInfo object associated with the given idgetPoint2D
(String id) Gets the double value associated to the given id.getPriceBar
(String id) Gets the bar info associated to the given id.Gets the ShadeInfo object associated to the given id.Gets the string value associated to the given id.Gets the string value associated to the given id.getTextStyle
(String id) Gets the double value associated to the given id.Gets the set of value associated with the given key.boolean
boolean
Gets the boolean value associated to the given id.boolean
Gets the boolean value associated to the given id.protected void
notifyProperty
(Object src, String propertyName, Object oldVal, Object newVal) Forces a property change event to occur for the given propertyfinal void
void
protected void
void
Removes all property change listeners.void
void
Removes a property change listener.void
void
setBarSize
(String id, BarSize barSize) Associates the given BarSize to the specified id.void
Sets the SettingsDescriptor object.void
Associates the given double value to the specified id.void
Associates the given input key to the specified id.void
setInstrument
(String id, Instrument instrument) Associates the given Instrument to the specified id.void
setMAMethod
(String id, Enums.MAMethod method) Associates the given MAMethod to the specified id.void
toJson()
void
update
(SettingsBase settings) Updates the information from the given object.
-
Field Details
-
values
-
descriptor
-
-
Constructor Details
-
SettingsBase
public SettingsBase() -
SettingsBase
-
-
Method Details
-
onUpdated
protected void onUpdated() -
setDescriptor
Sets the SettingsDescriptor object. This is called by the underlying study framework.- Parameters:
desc
- settings descriptor object
-
getDescriptor
Gets the SettingsDescriptor object that describes the user settings.- Returns:
- settings descriptor
-
getPath
-
getInput
-
getInput
Gets the input key associated to the given id. The 'def' value is returned if there is no input associated with the given id.- Parameters:
id
- id of the inputdef
- default to return if the input is undefined- Returns:
- the input key associated to the given id.
-
setInput
-
getMAMethod
Gets the Moving Average Calculation method associated to the given id- Parameters:
id
- id of the method- Returns:
- the MAMethod associated to the given id.
-
getMAMethod
Gets the Moving Average Calculation method associated to the given id. The given default value is returned if the method is not defined.- Parameters:
id
- id of the methoddef
- default value to return if the method is not defined- Returns:
- the MAMethod associated to the given id.
-
setMAMethod
Associates the given MAMethod to the specified id. This is called by the underlying study framework.- Parameters:
id
- id of the methodmethod
- moving average method
-
getBarSize
-
setBarSize
-
getInstrument
Gets the instrument associated to the given id- Parameters:
id
- id of the instrument- Returns:
- the Instrument associated to the given id.
-
setInstrument
Associates the given Instrument to the specified id. This is called by the underlying study framework.- Parameters:
id
- id of the instrumentinstrument
- instrument to associate
-
getMarker
Gets the MarkerInfo object associated with the given id- Parameters:
id
- id used to identify the marker- Returns:
- the MarkerInfo associated to the given id.
-
getIndicator
Gets the indicator associated with the given id- Parameters:
id
- id of the indicator- Returns:
- the IndicatorInfo associated to the given id.
-
getBars
-
getPriceBar
Gets the bar info associated to the given id.- Parameters:
id
- id of the bar info- Returns:
- the BarInfo associated to the given id.
-
getShade
-
getGuide
-
getFont
-
getFile
-
getColor
-
getColorInfo
-
getColor
Gets the color associated to the given id. The default color is returned if the color is undefined (null).- Parameters:
id
- id of the colordef
- default value if the color is not defined- Returns:
- the Color associated to the given id. If the color is null, the default color 'def' is returned.
-
getEnum
-
getEnum
-
getEnumInfo
-
get
-
get
-
set
-
setValue
-
getValue
-
getDouble
-
getTextStyle
-
getPoint2D
-
getDouble
Gets the double value associated to the given id. The def value is returned if the setting does not exist.- Parameters:
id
- id of the double valuedef
- default value to return if not defined- Returns:
- double value associated to the given id.
-
setDouble
-
getInteger
-
getInteger
Gets the integer value associated to the given id. The def value is returned if the setting does not exist.- Parameters:
id
- id of the integer valuedef
- default value to return if the id does not exist- Returns:
- integer value
-
getInt
Gets the int value associated to the given id (zero if not set).- Parameters:
id
- id of the value- Returns:
- integer value associated to the given id
-
getInt
Gets the int value associated to the given id. The def value is returned if the setting does not exist.- Parameters:
id
- id of the integer valuedef
- default value to return if the id does not exist- Returns:
- integer value
-
getLong
-
is
Gets the boolean value associated to the given id.- Parameters:
id
- id of the value- Returns:
- associated boolean value
-
has
-
is
Gets the boolean value associated to the given id.- Parameters:
id
- id of the valuedef
- default value if the current value is null- Returns:
- associated boolean value
-
getString
-
getString
-
update
Updates the information from the given object. This is called by the underlying study framework.- Parameters:
settings
- settings object
-
clone
Creates a clone (copy) of this object. -
equals
-
addPropertyChangeListener
Adds a property change listener.- Parameters:
listener
- property change listener
-
removePropertyChangeListener
Removes a property change listener.- Parameters:
listener
- property change listener
-
removeAllPropertyChangeListeners
public void removeAllPropertyChangeListeners()Removes all property change listeners. -
addListener
-
removeListener
-
notifyUpdatedLater
public void notifyUpdatedLater() -
notifyUpdated
public final void notifyUpdated() -
fromJson
-
toJsonStr
-
toJson
-
clearSets
protected void clearSets() -
notifyProperty
-