com.approximatrix.charting.render
Class ImageRenderer

java.lang.Object
  extended by com.approximatrix.charting.render.AbstractChartRenderer
      extended by com.approximatrix.charting.render.ImageRenderer
All Implemented Interfaces:
Renderer

public class ImageRenderer
extends AbstractChartRenderer

Renderer for creating dot plots. Renderer is relatively simple because the model itself holds an image of the data. The renderer buffers an appropriate-for-drawing image, which is only recreated if the coordinate system transform changes.

Author:
armstrong

Field Summary
private  IntegratedImageModel dpmodel
          The image model for rendering
private  java.awt.geom.AffineTransform last
          Buffered version of the coordinate transform used for painting
private  java.awt.Image renderImage
          BufferedImage object used for plotting
private  int scaleHints
          The hint for scaling the viewable image to fit the bounds
 
Fields inherited from class com.approximatrix.charting.render.AbstractChartRenderer
bounds, coord, listener, model, rcm, stopFlag
 
Constructor Summary
ImageRenderer(CoordSystem cs, IntegratedImageModel model)
          Creates the renderer from the coordinate system and the model
 
Method Summary
 void renderChart(java.awt.Graphics2D g)
          Renders the image.
 void setScaleHint(int value)
          Sets the image scaling hint
 
Methods inherited from class com.approximatrix.charting.render.AbstractChartRenderer
addRenderChangeListener, clearRenderChangeListeners, fireRenderChangeEvent, getBounds, getChartDataModel, getCoordSystem, getPreferredSize, getRowColorModel, getTransform, interruptRendering, removeRenderChangeListener, render, resetStopFlag, setBounds, setChartDataModel, setCoordSystem, setRowColorModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

last

private java.awt.geom.AffineTransform last
Buffered version of the coordinate transform used for painting


renderImage

private java.awt.Image renderImage
BufferedImage object used for plotting


dpmodel

private IntegratedImageModel dpmodel
The image model for rendering


scaleHints

private int scaleHints
The hint for scaling the viewable image to fit the bounds

Constructor Detail

ImageRenderer

public ImageRenderer(CoordSystem cs,
                     IntegratedImageModel model)
Creates the renderer from the coordinate system and the model

Parameters:
cs - the coordinate system
model - the model for rendering
Method Detail

renderChart

public void renderChart(java.awt.Graphics2D g)
Renders the image. If the transform has changed, the buffer is refreshed.

Specified by:
renderChart in class AbstractChartRenderer

setScaleHint

public void setScaleHint(int value)
Sets the image scaling hint

Parameters:
value - a valid scaling hint
See Also:
Image