com.exponto.jstock.indicators
Class IndicatorParameters

java.lang.Object
  |
  +--com.exponto.jstock.indicators.IndicatorParameters
All Implemented Interfaces:
IndicatorParametersInterface
Direct Known Subclasses:
MAParameters, RsiParameters

public abstract class IndicatorParameters
extends java.lang.Object
implements IndicatorParametersInterface

Base class for indicator specific parameters used in computation of an indicator series. Probably not needed, but is still around

Author:
kaare

Constructor Summary
IndicatorParameters()
           
 
Method Summary
abstract  boolean drawThis()
          Checks if the parameters settings of this indicator indicates that the Indicator is activated (e.g.
abstract  java.lang.String[] getParameterNames()
           
abstract  int[] getParameters()
           
abstract  javax.swing.JComponent[][] getUserInterface()
          Provides the Options menu with components to use for this indicator.
 Date getValidFrom()
           
 Date getValidTo()
           
abstract  void setParameters(int[] parameters)
           
abstract  void setParameters(int index, int value)
           
 void setValidFrom(Date date)
           
 void setValidTo(Date date)
           
abstract  void updateParameters()
          Used to update the parameters value within the IndicatorParameter class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndicatorParameters

public IndicatorParameters()
Method Detail

getParameters

public abstract int[] getParameters()

setParameters

public abstract void setParameters(int[] parameters)
Parameters:
parameters -

setParameters

public abstract void setParameters(int index,
                                   int value)
Parameters:
index -
value -

getParameterNames

public abstract java.lang.String[] getParameterNames()

drawThis

public abstract 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
Returns:
true this indicator shall be drawn (based on the parameters setting). False otherwise

getUserInterface

public abstract 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.

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

updateParameters

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

Specified by:
updateParameters in interface IndicatorParametersInterface

setValidFrom

public void setValidFrom(Date date)

getValidFrom

public Date getValidFrom()
Returns:
the first date with valid data for the indicator

setValidTo

public void setValidTo(Date date)

getValidTo

public Date getValidTo()
Returns:
the last date with valid data for the indicator


Copyright © 2004 Kaare Ranum