jcckit
Class GraphicsPlotCanvas.GraphicsPainter

java.lang.Object
  extended byjcckit.GraphicsPlotCanvas.GraphicsPainter
Direct Known Subclasses:
Graphics2DPlotCanvas.Graphics2DPainter
Enclosing class:
GraphicsPlotCanvas

protected class GraphicsPlotCanvas.GraphicsPainter
extends java.lang.Object

Class which does the actual painting. Needs the Component into which the plot is painted for some resources like size, background color, etc.

Author:
Franz-Josef Elmer

Constructor Summary
GraphicsPlotCanvas.GraphicsPainter(java.awt.Component component)
          Creates an instance for the specified component.
 
Method Summary
protected  void calculateTransformation(java.awt.Dimension size)
          Calculate the transformation form device-independent coordinates into device-dependent coordinates according to the specified canvas size.
protected  Renderer createRenderer(java.awt.Graphics g)
          Creates an appropriated Renderer for the specified Graphics context.
 void paint(java.awt.Graphics g)
          Paints the plot by using double-buffering and pre-rendered view of the coordinate system.
protected  void prepare(java.awt.Graphics g)
          Prepare graphics context before drawing the pre-rendered view of the coordinate system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsPlotCanvas.GraphicsPainter

public GraphicsPlotCanvas.GraphicsPainter(java.awt.Component component)
Creates an instance for the specified component.

Parameters:
component - AWT or Swing component.
Method Detail

paint

public void paint(java.awt.Graphics g)
Paints the plot by using double-buffering and pre-rendered view of the coordinate system.


prepare

protected void prepare(java.awt.Graphics g)
Prepare graphics context before drawing the pre-rendered view of the coordinate system. Does nothing but will be used in subclasses.


calculateTransformation

protected void calculateTransformation(java.awt.Dimension size)
Calculate the transformation form device-independent coordinates into device-dependent coordinates according to the specified canvas size.


createRenderer

protected Renderer createRenderer(java.awt.Graphics g)
Creates an appropriated Renderer for the specified Graphics context.