org.jfree.eastwood
Class ChartEngine

java.lang.Object
  extended by org.jfree.eastwood.ChartEngine

public class ChartEngine
extends java.lang.Object

The chart engine contains the code that reads the chart parameters and returns a corresponding JFreeChart instance.


Constructor Summary
ChartEngine()
           
 
Method Summary
static org.jfree.chart.JFreeChart buildChart(java.util.Map params)
          Creates and returns a new JFreeChart instance that reflects the specified parameters (which should be equivalent to a parameter map returned by HttpServletRequest.getParameterMap() for a valid URI for the Google Chart API.
static org.jfree.chart.JFreeChart buildChart(java.util.Map params, java.awt.Font font)
          Creates and returns a new JFreeChart instance that reflects the specified parameters (which should be equivalent to a parameter map returned by HttpServletRequest.getParameterMap() for a valid URI for the Google Chart API.
static java.awt.Dimension parseDimensions(java.lang.String text)
          Parses a string containing the chart dimensions.
static void processEWTR(java.util.Map params, org.jfree.chart.JFreeChart chart)
          The 'ewtr' tag is an Eastwood extension that draws a trend line over a chart, using data that has been added to a secondary dataset using the 'ewd2' tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartEngine

public ChartEngine()
Method Detail

buildChart

public static org.jfree.chart.JFreeChart buildChart(java.util.Map params)
Creates and returns a new JFreeChart instance that reflects the specified parameters (which should be equivalent to a parameter map returned by HttpServletRequest.getParameterMap() for a valid URI for the Google Chart API.

Parameters:
params - the parameters (null not permitted).
Returns:
A chart corresponding to the specification in the supplied parameters.

buildChart

public static org.jfree.chart.JFreeChart buildChart(java.util.Map params,
                                                    java.awt.Font font)
Creates and returns a new JFreeChart instance that reflects the specified parameters (which should be equivalent to a parameter map returned by HttpServletRequest.getParameterMap() for a valid URI for the Google Chart API.

Parameters:
params - the parameters (null not permitted).
font - the font to use to draw titles, labels and legends.
Returns:
A chart corresponding to the specification in the supplied parameters.

processEWTR

public static void processEWTR(java.util.Map params,
                               org.jfree.chart.JFreeChart chart)
The 'ewtr' tag is an Eastwood extension that draws a trend line over a chart, using data that has been added to a secondary dataset using the 'ewd2' tag.

Parameters:
params - the chart parameters;
chart - the chart under construction (will be updated by this method if necessary).

parseDimensions

public static java.awt.Dimension parseDimensions(java.lang.String text)
Parses a string containing the chart dimensions.

Parameters:
text - the text (null not permitted).
Returns:
The chart dimensions.


Copyright © 2010. All Rights Reserved.