com.exponto.jstock.indicators
Class RsiParameters

java.lang.Object
  |
  +--com.exponto.jstock.indicators.IndicatorParameters
        |
        +--com.exponto.jstock.indicators.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)
           
 
Method Summary
 boolean drawThis()
          Checks if the parameters settings of this indicator indicates that the Indicator is activated (e.g.
 int getNumberOfDays()
           
 java.lang.String[] getParameterNames()
           
 int[] getParameters()
           
 javax.swing.JComponent[][] getUserInterface()
          Provides the Options menu with components to use for this indicator.
 void setNumberOfDays(int i)
           
 void setParameters(int[] parameters)
           
 void setParameters(int index, int value)
           
 void updateParameters()
          Used to update the parameters value within the IndicatorParameter class.
 
Methods inherited from class com.exponto.jstock.indicators.IndicatorParameters
getValidFrom, getValidTo, setValidFrom, setValidTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RsiParameters

public RsiParameters(int days)
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

drawThis

public boolean drawThis()
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:
drawThis in interface IndicatorParametersInterface
Specified by:
drawThis in class IndicatorParameters
Returns:
true this indicator shall be drawn (based on the parameters setting). False otherwise


Copyright © 2004 Kaare Ranum