com.exponto.jstock
Class ChartData

java.lang.Object
  extended bycom.exponto.jstock.ChartData

public class ChartData
extends java.lang.Object

ChartData.java Load the dataset from file or other source. Can transform dataset to other formats (log, weekly) as required. Does contain some buisness logic (I'll try to move it out of here)

Author:
kaare

Constructor Summary
ChartData(TickerID tId, java.lang.String panelType)
          Creates ChartData for a daily series.
ChartData(TickerID tId, java.lang.String panelType, LogDataSeries lDS)
          Used to create ChartData for weekly charts.
 
Method Summary
 java.util.ArrayList getEnabledCandleStickIndicators()
           
 java.util.ArrayList getEnabledIndicators()
           
 LogDataSeries getLogDataSeries()
           
 java.lang.String getPanelType()
           
 TickerID getTickerID()
           
 int numberOfPanels()
          Returns the number of indicators that needs a separate JPanel in order to draw a series.
 void setPanelType(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartData

public ChartData(TickerID tId,
                 java.lang.String panelType)
          throws TickerNotFoundException
Creates ChartData for a daily series. Should work for weekly as well, but will do the file reading once more (if it is already read for a daily series)

Parameters:
tId - the TickerID to create ChartData for
Throws:
TickerNotFoundException

ChartData

public ChartData(TickerID tId,
                 java.lang.String panelType,
                 LogDataSeries lDS)
          throws TickerNotFoundException
Used to create ChartData for weekly charts. Uses the the LogDataSeries found for the daily chart. Should work well for daily charts as well if lDS is null.

Parameters:
tId - the TickerID to create ChartData for
panelType - - the type of panel (daily weekly ...)
lDS - the LogDataSeries from the charts
Throws:
TickerNotFoundException
Method Detail

numberOfPanels

public int numberOfPanels()
Returns the number of indicators that needs a separate JPanel in order to draw a series. Indicators that are drawn with the candlestick chart are not counted nor is indicators that are disabled.

Returns:
the number of panels needed to draw the indicators

getEnabledCandleStickIndicators

public java.util.ArrayList getEnabledCandleStickIndicators()
Returns:
an ArrayList with all Indicators that shall be drawn together with the candlestickPanel

getEnabledIndicators

public java.util.ArrayList getEnabledIndicators()
Returns:
an ArrayList with all Indicators that shall be drawn in a separate JPanel

getLogDataSeries

public LogDataSeries getLogDataSeries()
Returns:
the LogDataSeries

getTickerID

public TickerID getTickerID()
Returns:
Returns the TickerID.

getPanelType

public java.lang.String getPanelType()
Returns:
Returns the m_panelName.

setPanelType

public void setPanelType(java.lang.String name)
Parameters:
name - The m_panelName to set.


Copyright © 2004 Kaare Ranum