|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The IndicatorInterface defines how the rest of the applications should interact with different indicators. It is assumed that indicators has a valid start and stop date that is dervied from the input data to the indicator (LogDataSeries) and indicator spesific parameters (e.g. a Moving Average computed over 200 days, will not be valid for the first 200 days in a LogDataSeries.). Further more it is required that the indicator can display itself correctly on the screen, based on the size of the JPanel (or possibly the Graphics2D) and the width of candlesticks. It is also required that a indicator can give information about a particular day. Mouse and/or keyboard input is currently not part of this interface Note that the daily LogDataSeries assumes that all weeks has five valid days.
Method Summary | |
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.lang.String |
getDailyPrintOut(int n)
Makes a String with name, parameters and value (e.g. |
boolean |
getDisplayed()
Information to other classes wheter this instance of an indicator shall be displayed on screen or not. |
java.lang.String |
getIndicatorName()
|
IndicatorParameters |
getIndicatorParameters()
This returns the IndicatorParameter used together with a specific indicator. |
boolean |
hasChanged()
Check if the calling class can use data obtained from a previous call to paintIndicator or not. |
void |
initiateIndicator(LogDataSeries lDS)
Initiates an indicator with the provided LogDataSeries combined with indicator specific parameters either provied from a properties file or the user. |
void |
initiateIndicator(LogDataSeries lDS,
java.lang.String indParam)
As above but with Indicatorparameters provided in a string format. |
boolean |
isMainIndicator()
One of the indicators is a main indicator and is given more screen space than the rest. |
void |
paintIndicator(java.awt.Graphics2D g2d,
GraphicsParameters gP)
Sends the Indicator a Graphics2D and asks it to paint itself on that Graphics. |
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 |
setDisplayed(boolean b)
Gives other classes an opportunity to change the display status of this indicator. |
boolean |
supportIndicatorValuesInterface()
Return true if theIndicatorValuesInterface is implemented for this class. |
Method Detail |
public java.lang.String getIndicatorName()
public IndicatorParameters getIndicatorParameters()
public void initiateIndicator(LogDataSeries lDS)
lDS
- The LogDataSeries containg values to computes the indicatorpublic void initiateIndicator(LogDataSeries lDS, java.lang.String indParam)
lDS
- public boolean isMainIndicator()
public boolean getDisplayed()
public void setDisplayed(boolean b)
b
- - true if the indicator shall be displayed, false ohterwise.public boolean drawWithCandleSticks()
public boolean hasChanged()
public void paintIndicator(java.awt.Graphics2D g2d, GraphicsParameters gP)
g2d
- the Graphics to paint onpublic java.lang.String getDailyPrintOut(int n)
n
- the number of day (0 is the first visible day on screen
public java.lang.String[] printAll(int number)
number
- of values to print, starting from the latest
public boolean supportIndicatorValuesInterface()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |