org.apache.batik.refimpl.gvt
Class ConcreteCompositeShapePainter

java.lang.Object
  |
  +--org.apache.batik.refimpl.gvt.ConcreteCompositeShapePainter
All Implemented Interfaces:
CompositeShapePainter, ShapePainter

public class ConcreteCompositeShapePainter
extends java.lang.Object
implements CompositeShapePainter

The default implementation of the CompositeShapePainter.


Field Summary
protected  int count
          The number of shape painter.
protected  ShapePainter[] painters
          The enclosed ShapePainters of this composite shape painter.
 
Constructor Summary
ConcreteCompositeShapePainter()
          Constructs a new empty composite ShapePainter.
 
Method Summary
 void addShapePainter(ShapePainter shapePainter)
          Adds the specified shape painter to this composite shape painter.
 java.awt.Shape getPaintedArea(java.awt.Shape shape)
          Returns the area painted by this painter for a given input shape
 void paint(java.awt.Shape shape, java.awt.Graphics2D g2d, GraphicsNodeRenderContext ctx)
          Paints the specified shape using the specified Graphics2D and context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

painters

protected ShapePainter[] painters
The enclosed ShapePainters of this composite shape painter.

count

protected int count
The number of shape painter.
Constructor Detail

ConcreteCompositeShapePainter

public ConcreteCompositeShapePainter()
Constructs a new empty composite ShapePainter.
Method Detail

addShapePainter

public void addShapePainter(ShapePainter shapePainter)
Description copied from interface: CompositeShapePainter
Adds the specified shape painter to this composite shape painter.
Specified by:
addShapePainter in interface CompositeShapePainter
Following copied from interface: org.apache.batik.gvt.CompositeShapePainter
Parameters:
shapePainter - the shape painter to add

paint

public void paint(java.awt.Shape shape,
                  java.awt.Graphics2D g2d,
                  GraphicsNodeRenderContext ctx)
Description copied from interface: ShapePainter
Paints the specified shape using the specified Graphics2D and context.
Specified by:
paint in interface ShapePainter
Following copied from interface: org.apache.batik.gvt.ShapePainter
Parameters:
shape - the shape to paint
g2d - the Graphics2D to use
ctx - the render context to use

getPaintedArea

public java.awt.Shape getPaintedArea(java.awt.Shape shape)
Description copied from interface: ShapePainter
Returns the area painted by this painter for a given input shape
Specified by:
getPaintedArea in interface ShapePainter
Following copied from interface: org.apache.batik.gvt.ShapePainter
Parameters:
shape - the shape to paint


Copyright © 2000 Apache Software Foundation. All Rights Reserved.