Class SwingChartRenderer

java.lang.Object
PamView.chart.PamChartRenderer
PamView.chart.swing.SwingChartRenderer
Direct Known Subclasses:
QASwingChartRenderer

public class SwingChartRenderer extends PamChartRenderer
  • Constructor Details

    • SwingChartRenderer

      public SwingChartRenderer(PamChart pamChart)
      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

      public boolean renderChart(Graphics g, Dimension dimension) throws ChartRenderException
      Render the chart onto a single graphics handle. Calculate required border insets and use accordingly ...
      Specified by:
      renderChart in class PamChartRenderer
      Parameters:
      g -
      Returns:
      Throws:
      ChartRenderException
    • calculateInsets

      public Insets calculateInsets(Graphics g)
    • renderborder

      public boolean renderborder(Graphics g, Dimension dimension, Insets plotInsets, boolean drawBox)
      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 area
      dimension - plot dimensions
      plotInsets - plot insets
      Returns:
      OK if drawn
      Throws:
      ChartRenderException
    • renderKey

      public boolean renderKey(Graphics g, Dimension dimension, Insets plotInsets)
      Draw the key on the main plot area.
      Parameters:
      g - graphics handle to plot area
      dimension - plot dimensions
      plotInsets - plot insets
      Returns:
      OK if drawn