com.exponto.jstock.indicators
Interface IndicatorParametersInterface

All Known Implementing Classes:
IndicatorParameters

public interface IndicatorParametersInterface

Author:
kaare

Method Summary
 int[] fromParameterString(java.lang.String s)
          Generates new parameter(s) from a string.
 javax.swing.JComponent[][] getUserInterface()
          Provides the Options menu with components to use for this indicator.
 int hashCode()
           
 boolean indicatorEnabled()
          Checks if the parameters settings of this indicator indicates that the Indicator is activated (e.g.
 java.lang.String toParameterString()
          Used to generate a string of the parameter(s) of this instance.
 void updateParameters()
          Used to ensure that indicators parameters are up to date before saving.
 

Method Detail

indicatorEnabled

public boolean indicatorEnabled()
Checks if the parameters settings of this indicator indicates that the Indicator is activated (e.g. number of days used in RSI calcultaion set to a value larger than 0).

Returns:
true if this indicator shall be drawn (based on the parameters setting). False otherwise

getUserInterface

public javax.swing.JComponent[][] getUserInterface()
Provides the Options menu with components to use for this indicator. The JComponents are responsible for notifying "their" indicator when values are changed, and also update the properties files. Note that the receiving class makes a few assumptions on the content of the array.

Returns:
an JComponent array with the components that shall be displayed

updateParameters

public void updateParameters()
Used to ensure that indicators parameters are up to date before saving. Typical implementation will read the parameters values from the user interface (JComponent [][]) and set the indicators parameters.


toParameterString

public java.lang.String toParameterString()
Used to generate a string of the parameter(s) of this instance. May e.g. be used for persitent storing of the parameters

Returns:
the parameters of the class encoded as a string

fromParameterString

public int[] fromParameterString(java.lang.String s)
Generates new parameter(s) from a string. May be used to regenerate parameters stored in db. Also see above.

Parameters:
s - the parameters of the class encoded as a string
Returns:
int [] with the parameter values

hashCode

public int hashCode()


Copyright © 2004 Kaare Ranum