Package PamView.chart.swing
Class SwingChartRenderer
java.lang.Object
PamView.chart.PamChartRenderer
PamView.chart.swing.SwingChartRenderer
- Direct Known Subclasses:
QASwingChartRenderer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
renderborder
(Graphics g, Dimension dimension, Insets plotInsets, boolean drawBox) Render the plot border.boolean
renderChart
(Graphics g, Dimension dimension) Render the chart onto a single graphics handle.boolean
renderChart
(Graphics border, Dimension dimension, Graphics plot, Insets borderInsets) Render the graph into the given graphics handle.boolean
Draw the key on the main plot area.boolean
renderPlot
(Graphics g, Dimension dimension, Insets plotInsets) Render the plot.Methods inherited from class PamView.chart.PamChartRenderer
getPamChart, renderBufferedImage
-
Constructor Details
-
SwingChartRenderer
- Parameters:
pamChart
-
-
-
Method Details
-
renderChart
public boolean renderChart(Graphics border, Dimension dimension, Graphics plot, Insets borderInsets) throws ChartRenderException Render the graph into the given graphics handle. Two are given since this may be used with nested windows, i.e. with the plot within the border. If this IS the case, then the border insets are needed to define where on the border to draw axis, etc.- Parameters:
border
-plot
-borderInsets
-- Returns:
- Throws:
ChartRenderException
-
renderChart
Render the chart onto a single graphics handle. Calculate required border insets and use accordingly ...- Specified by:
renderChart
in classPamChartRenderer
- Parameters:
g
-- Returns:
- Throws:
ChartRenderException
-
calculateInsets
-
renderborder
Render the plot border. The insets for the plot are (probably) never null since they are needed to inform where to paint the axis.- Parameters:
g
-plotInsets
-- Returns:
-
renderPlot
public boolean renderPlot(Graphics g, Dimension dimension, Insets plotInsets) throws ChartRenderException Render the plot. If the graphics handle for this plot is different to that of the border, then it's likely insets will be 0 or null. If it's a single graphics object the whole thing is being written to, then the insets will need to be no zero to allow for axis.- Parameters:
g
- graphics handle to plot areadimension
- plot dimensionsplotInsets
- plot insets- Returns:
- OK if drawn
- Throws:
ChartRenderException
-
renderKey
Draw the key on the main plot area.- Parameters:
g
- graphics handle to plot areadimension
- plot dimensionsplotInsets
- plot insets- Returns:
- OK if drawn
-