com.mytrendtimer.trendtimer
Class MttChart

java.lang.Object
  extended by com.mytrendtimer.trendtimer.MttChart

public class MttChart
extends java.lang.Object

The MttChart rely on JFreeChart to quickly plot the calculated data onto a chart. Quotes are a line serie, buy and sell signals are histogram series.

Version:
v0.99.4 for jfree.chart 1.0.12
Author:
FRM

Field Summary
static java.lang.String OUT_IMG_FILE_PATH
          The path (relative to baseDir !)
 
Constructor Summary
MttChart()
           
 
Method Summary
static void chartFileCopy(java.lang.String sourceFileArg, java.lang.String targetFileArg)
          Chart file (.png) copy.
 org.jfree.chart.JFreeChart createChart(java.lang.String title, float minYAxisArg, float maxYAxisArg, boolean detailedChart)
          Creates the overlaid (quote, buy, sell, osc1 and osc2) chart.
 void saveChart(java.lang.String title, float minYaxisArg, float maxYaxisArg, boolean detailedChart, QuoteSourceFile quoteSrvFileArg)
          Save the chart into a png image.
 void showChartInJFrame()
          Display the chart in a JFrame
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUT_IMG_FILE_PATH

public static final java.lang.String OUT_IMG_FILE_PATH
The path (relative to baseDir !) where the chart images (.png) file is going to be created

See Also:
Constant Field Values
Constructor Detail

MttChart

public MttChart()
Method Detail

chartFileCopy

public static void chartFileCopy(java.lang.String sourceFileArg,
                                 java.lang.String targetFileArg)
Chart file (.png) copy.

Parameters:
sourceFileArg - The source file to copy
targetFileArg - The target file

createChart

public org.jfree.chart.JFreeChart createChart(java.lang.String title,
                                              float minYAxisArg,
                                              float maxYAxisArg,
                                              boolean detailedChart)
Creates the overlaid (quote, buy, sell, osc1 and osc2) chart.

Parameters:
title - The frame title.
minYAxisArg - The lowest point on the chart y scale
maxYAxisArg - The highest point on the chart y scale
detailedChart - The display to osc1 and osc2 on the chart.
Returns:
The chart.

saveChart

public void saveChart(java.lang.String title,
                      float minYaxisArg,
                      float maxYaxisArg,
                      boolean detailedChart,
                      QuoteSourceFile quoteSrvFileArg)
               throws java.io.IOException
Save the chart into a png image.

Parameters:
title - The frame title.
minYaxisArg - The lowest point on the chart y scale
maxYaxisArg - The highest point on the chart y scale
Throws:
java.io.IOException

showChartInJFrame

public void showChartInJFrame()
Display the chart in a JFrame