com.approximatrix.charting
Interface Chart

All Known Implementing Classes:
AbstractChart, AbstractChartPanel, BufferedChart, BufferedChartPanel, ChartPanel, DefaultChart, ExtendedChart, ExtendedChartPanel

public interface Chart

This class defines the methods to access a chart. It provides methods to set the multiple chart components. You can set multiple ChartRenderer giving them a z-coordinate. The ChartRenderer that is rendered first is the one with the lowest z-coordinate.

Version:
1.0
Author:
mueller

Method Summary
 void addChartRenderer(AbstractChartRenderer renderer, int z)
          Adds a ChartRenderer with a specific z-coordinate.
 java.awt.Rectangle getBounds()
          Returns the Bounds for the Chart.
 ChartDataModel getChartDataModel()
          Returns the ChartDataModel.
 java.util.Map getChartRenderer()
          Returns the Map of all ChartRenderers.
 AbstractChartRenderer getChartRenderer(int z)
          Returns the ChartRenderer with a specific z-coordinate.
 CoordSystem getCoordSystem()
          Returns the coordinate system.
 Legend getLegend()
          Returns this chart's legend.
 Title getTitle()
          Returns the title for this chart.
 void render(java.awt.Graphics2D g)
          Does the layout of the title, legend and coordinate system and calls the render method of all those including the ChartRenderers.
 void setBounds(java.awt.Rectangle r)
          Sets the Bounds for this Chart.
 void setChartDataModel(ChartDataModel model)
          Stores the ChartDataModel for this Chart.
 void setChartRenderer(java.util.Map renderer)
          Sets the Map with all ChartRenderers.
 void setCoordSystem(CoordSystem c)
          Sets the coordinate system for this chart, which can be null if the ChartRenderer doesn't need a coordinate system, e.g.
 void setLegend(Legend l)
          Sets the legend for this chart.
 void setTitle(Title t)
          Sets the title for this chart.
 

Method Detail

setLegend

void setLegend(Legend l)
Sets the legend for this chart.

Parameters:
l - The Legend this Chart contains.

getLegend

Legend getLegend()
Returns this chart's legend.

Returns:
the Legend for this Chart. Could be null.

setTitle

void setTitle(Title t)
Sets the title for this chart.

Parameters:
t - This Chart's Title.

getTitle

Title getTitle()
Returns the title for this chart.

Returns:
this Chart's Title. Could be null.

setCoordSystem

void setCoordSystem(CoordSystem c)
Sets the coordinate system for this chart, which can be null if the ChartRenderer doesn't need a coordinate system, e.g. if it's a PieChart.

Parameters:
c - The Coordinate System for the Chart.

getCoordSystem

CoordSystem getCoordSystem()
Returns the coordinate system.

Returns:
the Coordinate System for the Chart. Could be null.

setChartRenderer

void setChartRenderer(java.util.Map renderer)
Sets the Map with all ChartRenderers. The keys have to be the z-coordinates of the ChartRenderers.

Parameters:
renderer - The Map of ChartRenderers.

getChartRenderer

java.util.Map getChartRenderer()
Returns the Map of all ChartRenderers.

Returns:
the Map of Renderers.

addChartRenderer

void addChartRenderer(AbstractChartRenderer renderer,
                      int z)
Adds a ChartRenderer with a specific z-coordinate.

Parameters:
renderer - the ChartRenderer
z - its z-coordinate.

getChartRenderer

AbstractChartRenderer getChartRenderer(int z)
Returns the ChartRenderer with a specific z-coordinate.

Parameters:
z - the z-coordinate of the desired ChartRenderer.
Returns:
the ChartRenderer or null if none has been found.

setChartDataModel

void setChartDataModel(ChartDataModel model)
Stores the ChartDataModel for this Chart.

Parameters:
model - the ChartDataModel

getChartDataModel

ChartDataModel getChartDataModel()
Returns the ChartDataModel.

Returns:
the ChartDataModel

setBounds

void setBounds(java.awt.Rectangle r)
Sets the Bounds for this Chart.

Parameters:
r - the Rectangle object defining the bounds

getBounds

java.awt.Rectangle getBounds()
Returns the Bounds for the Chart.

Returns:
the bounds

render

void render(java.awt.Graphics2D g)
Does the layout of the title, legend and coordinate system and calls the render method of all those including the ChartRenderers.

Parameters:
g - the Graphics2D object to paint in.