org.apache.batik.refimpl.gvt.renderer
Class DynamicRenderer

java.lang.Object
  |
  +--org.apache.batik.refimpl.gvt.renderer.StaticRenderer
        |
        +--org.apache.batik.refimpl.gvt.renderer.DynamicRenderer
All Implemented Interfaces:
Renderer

public class DynamicRenderer
extends StaticRenderer

Simple implementation of the Renderer that supports dynamic updates.


Inner Class Summary
static interface DynamicRenderer.RepaintHandler
          Handler interface for receiving the area of interest when an area has been modified.
protected  class DynamicRenderer.UpdateListener
          Simple listener that fire the repaint handler when the GVT tree has been modified.
 
Field Summary
protected  DynamicRenderer.RepaintHandler repaintHandler
          The handler to notify that a region has to be repainted.
protected  DynamicRenderer.UpdateListener updateListener
          The listener that receives PropertyChangeEvent and notify the RepaintHandler that a region has to be repainted.
 
Fields inherited from class org.apache.batik.refimpl.gvt.renderer.StaticRenderer
nodeRenderContext, offScreen, treeRoot, usr2dev
 
Constructor Summary
DynamicRenderer(java.awt.image.BufferedImage offScreen)
          Constructs a new dynamic renderer with the specified buffer image.
DynamicRenderer(java.awt.image.BufferedImage offScreen, GraphicsNodeRenderContext rc)
          Constructs a new dynamic renderer with the specified buffer image.
 
Method Summary
 void dispose()
          Disposes all resources of this renderer.
 DynamicRenderer.RepaintHandler getRepaintHandler()
          Returns the repaint handler of this dynamic renderer.
 void setRepaintHandler(DynamicRenderer.RepaintHandler repaintHandler)
          Sets the repaint handler to the specified repaint handler.
 void setTree(GraphicsNode newTreeRoot)
          This associates the given GVT Tree with this renderer.
 
Methods inherited from class org.apache.batik.refimpl.gvt.renderer.StaticRenderer
getRenderContext, getTransform, getTree, isProgressivePaintAllowed, repaint, setOffScreen, setProgressivePaintAllowed, setRenderContext, setTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

updateListener

protected DynamicRenderer.UpdateListener updateListener
The listener that receives PropertyChangeEvent and notify the RepaintHandler that a region has to be repainted.

repaintHandler

protected DynamicRenderer.RepaintHandler repaintHandler
The handler to notify that a region has to be repainted.
Constructor Detail

DynamicRenderer

public DynamicRenderer(java.awt.image.BufferedImage offScreen)
Constructs a new dynamic renderer with the specified buffer image.
Parameters:
offScreen - the offscreen buffer to use

DynamicRenderer

public DynamicRenderer(java.awt.image.BufferedImage offScreen,
                       GraphicsNodeRenderContext rc)
Constructs a new dynamic renderer with the specified buffer image.
Parameters:
offScreen - the offscreen buffer to use
rc - the GraphicsNodeRenderContext to use
Method Detail

setTree

public void setTree(GraphicsNode newTreeRoot)
Description copied from class: StaticRenderer
This associates the given GVT Tree with this renderer. Any previous tree association is forgotten. Not certain if this should be just GraphicsNode, or CanvasGraphicsNode.
Overrides:
setTree in class StaticRenderer

dispose

public void dispose()
Disposes all resources of this renderer.
Overrides:
dispose in class StaticRenderer

setRepaintHandler

public void setRepaintHandler(DynamicRenderer.RepaintHandler repaintHandler)
Sets the repaint handler to the specified repaint handler.
Parameters:
repaintHandler - the new repaint handler of this renderer

getRepaintHandler

public DynamicRenderer.RepaintHandler getRepaintHandler()
Returns the repaint handler of this dynamic renderer.


Copyright © 2000 Apache Software Foundation. All Rights Reserved.