ca.sqlpower.wabit.swingui.chart
Class ChartSwingUtil

java.lang.Object
  extended by ca.sqlpower.wabit.swingui.chart.ChartSwingUtil

public class ChartSwingUtil
extends java.lang.Object

This is a collection of swing specific chart utilities. You should not make an instance of this class.


Method Summary
static org.jfree.chart.JFreeChart createChartFromQuery(Chart c)
          Creates a JFreeChart based on the current query results produced by the given chart.
static void makeChartNice(org.jfree.chart.JFreeChart chart)
          Sets the colours and gradients to be used when painting the given JFreeChart.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createChartFromQuery

public static org.jfree.chart.JFreeChart createChartFromQuery(Chart c)
                                                       throws java.sql.SQLException,
                                                              QueryInitializationException,
                                                              java.lang.InterruptedException
Creates a JFreeChart based on the current query results produced by the given chart.

Parameters:
c - The chart from which to produce a JFreeChart component. Must not be null.
Returns:
A chart based on the data and settings in the given chart, or null if the given chart is not sufficiently configured (for example, if its type is not set) or it is currently unable to produce a result set.
Throws:
java.sql.SQLException
QueryInitializationException
java.lang.InterruptedException

makeChartNice

public static void makeChartNice(org.jfree.chart.JFreeChart chart)
Sets the colours and gradients to be used when painting the given JFreeChart.

Parameters:
chart - The JFreeChart to make nice.


Copyright © 2009. All Rights Reserved.