com.exponto.jstock.obsolete
Class RsiParameters

java.lang.Object
  extended bycom.exponto.jstock.indicators.IndicatorParameters
      extended bycom.exponto.jstock.obsolete.RsiParameters
All Implemented Interfaces:
IndicatorParametersInterface

public class RsiParameters
extends IndicatorParameters

Contains RSI specific parameters used in computation of an indicator series

Author:
kaare

Constructor Summary
RsiParameters(int days)
           
RsiParameters(java.lang.String s)
           
 
Method Summary
 int[] fromParameterString(java.lang.String s)
          Generates new parameter(s) from a string.
 int getNumberOfDays()
           
 java.lang.String[] getParameterNames()
           
 int[] getParameters()
           
 javax.swing.JComponent[][] getUserInterface()
          Provides the Options menu with components to use for this indicator.
 boolean indicatorEnabled()
          Checks if the parameters settings of this indicator indicates that the Indicator is activated (e.g.
 void setNumberOfDays(int i)
           
 void setParameters(int[] parameters)
           
 void setParameters(int index, int value)
           
 java.lang.String toParameterString()
          Used to generate a string of the parameter(s) of this instance.
 void updateParameters()
          Used to update the parameters value within the IndicatorParameter class.
 
Methods inherited from class com.exponto.jstock.indicators.IndicatorParameters
equals, getValidFrom, getValidTo, hashCode, setValidFrom, setValidTo, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RsiParameters

public RsiParameters(int days)

RsiParameters

public RsiParameters(java.lang.String s)
Method Detail

getUserInterface

public javax.swing.JComponent[][] getUserInterface()
Description copied from class: IndicatorParameters
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.

Specified by:
getUserInterface in interface IndicatorParametersInterface
Specified by:
getUserInterface in class IndicatorParameters
Returns:
an JComponent array with the components that shall be displayed

updateParameters

public void updateParameters()
Description copied from interface: IndicatorParametersInterface
Used to update the parameters value within the IndicatorParameter class.

Specified by:
updateParameters in interface IndicatorParametersInterface
Specified by:
updateParameters in class IndicatorParameters

getParameters

public int[] getParameters()
Specified by:
getParameters in class IndicatorParameters
Returns:
the number of days used in the RSI calculation

setParameters

public void setParameters(int index,
                          int value)
Specified by:
setParameters in class IndicatorParameters
Parameters:
index -
value -

setParameters

public void setParameters(int[] parameters)
Specified by:
setParameters in class IndicatorParameters
Parameters:
parameters -

getParameterNames

public java.lang.String[] getParameterNames()
Specified by:
getParameterNames in class IndicatorParameters

getNumberOfDays

public int getNumberOfDays()

setNumberOfDays

public void setNumberOfDays(int i)
Parameters:
i - the number of days used in the RSI calculation

indicatorEnabled

public boolean indicatorEnabled()
Description copied from interface: IndicatorParametersInterface
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).

Specified by:
indicatorEnabled in interface IndicatorParametersInterface
Specified by:
indicatorEnabled in class IndicatorParameters

toParameterString

public java.lang.String toParameterString()
Description copied from interface: IndicatorParametersInterface
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)
Description copied from interface: IndicatorParametersInterface
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:


Copyright © 2004 Kaare Ranum