|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.exponto.jstock.indicators.Indicator
The base class for all indicators. A few static methods of the indicator interface are implemented here, the erst are found in the subclasses that implements the actual indicators.
Field Summary | |
protected java.awt.Color |
indicatorColor
|
Constructor Summary | |
Indicator()
|
Method Summary | |
protected int |
displayNumberToArrayIndex(int n,
GraphicsParameters graphicsParameters,
java.util.ArrayList indicatorSeries)
Avoid using this as it is not correct in all cases - will be removed Finds the place in the indicatorSeries for a particular posistion on the display |
abstract boolean |
drawWithCandleSticks()
Information for the class that allocates screenspace wheter a particular indicator requires a separate screen space or if it shall be painted with the candlesticks. |
java.awt.Color |
getColor()
|
abstract java.lang.String |
getDailyPrintOut(int n)
Makes a String with name, parameters and value (e.g. |
abstract IndicatorParameters |
getIndicatorParameters()
|
abstract boolean |
hasChanged()
Check if the calling class can use data obtained from a previous call to paintIndicator or not. |
abstract void |
initiateIndicator(LogDataSeries lDS)
Initiates an indicator with the provided LogDataSeries combined with indicator spesific parameters either provied from a properties file or the user. |
abstract void |
initiateIndicator(LogDataSeries lDS,
IndicatorParameters indParam)
As above but with Indicatorparameters provided directly |
abstract void |
paintIndicator(java.awt.Graphics2D g2d,
GraphicsParameters gP)
Sends the Indicator a Graphics2D and asks it to paint itself on that Graphics. |
abstract java.lang.String[] |
printAll(int number)
Generates an Array of strings that is suitable for printing to file or debugging purposes with all data within the range. |
void |
setColor(java.awt.Color color)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.awt.Color indicatorColor
Constructor Detail |
public Indicator()
Method Detail |
public abstract IndicatorParameters getIndicatorParameters()
getIndicatorParameters
in interface IndicatorInterface
public abstract void initiateIndicator(LogDataSeries lDS)
IndicatorInterface
initiateIndicator
in interface IndicatorInterface
lDS
- The LogDataSeries containg values to computes the indicatorpublic abstract void initiateIndicator(LogDataSeries lDS, IndicatorParameters indParam)
IndicatorInterface
initiateIndicator
in interface IndicatorInterface
lDS
- indParam
- public abstract boolean drawWithCandleSticks()
IndicatorInterface
drawWithCandleSticks
in interface IndicatorInterface
public abstract boolean hasChanged()
IndicatorInterface
hasChanged
in interface IndicatorInterface
public abstract void paintIndicator(java.awt.Graphics2D g2d, GraphicsParameters gP)
IndicatorInterface
paintIndicator
in interface IndicatorInterface
g2d
- the Graphics to paint onpublic abstract java.lang.String getDailyPrintOut(int n)
IndicatorInterface
getDailyPrintOut
in interface IndicatorInterface
n
- the number of day (0 is the first visible day on screen
public abstract java.lang.String[] printAll(int number)
IndicatorInterface
printAll
in interface IndicatorInterface
number
- of values to print, starting from the latest
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
protected int displayNumberToArrayIndex(int n, GraphicsParameters graphicsParameters, java.util.ArrayList indicatorSeries)
n
- the posistion on display
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |