Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.gvt
Class CompositeShapePainter

    java.lang.Object
      org.apache.batik.gvt.CompositeShapePainter

All Implemented Interfaces:
  ShapePainter

    public class CompositeShapePainter

extends Object
implements ShapePainter

A shape painter which consists of multiple shape painters.

Field Summary
`protected int` | `count` The number of shape painter.
`protected ShapePainter[]` | `painters` The enclosed `ShapePainter`s of this composite shape painter.
`protected Shape` | `shape` The shape associated with this painter

Constructor Summary
`CompositeShapePainter(Shape shape)` Constructs a new empty `CompositeShapePainter`.

Method Summary
`void` | `addShapePainter(ShapePainter shapePainter)` Adds the specified shape painter to the shape painter..
`Shape` | `getPaintedArea()` Returns the area painted by this shape painter.
`Rectangle2D` | `getPaintedBounds2D()` Returns the bounds of the area painted by this shape painter
`Shape` | `getSensitiveArea()` Returns the area covered by this shape painter (even if nothing is painted there).
`Rectangle2D` | `getSensitiveBounds2D()` Returns the bounds of the area painted by this shape painter
`Shape` | `getShape()` Gets the Shape this shape painter is associated with.
`ShapePainter` | `getShapePainter(int index)` Returns the shape painter at the specified index.
`int` | `getShapePainterCount()` Returns the number of shape painter of this composite shape painter.
`boolean` | `inPaintedArea(Point2D pt)` Returns true if pt is in the area painted by this shape painter
`boolean` | `inSensitiveArea(Point2D pt)` Returns true if pt is in the area painted by this shape painter
`void` | `paint(Graphics2D g2d)` Paints the specified shape using the specified Graphics2D.
`void` | `setShape(Shape shape)` Sets the Shape this shape painter is associated with.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### shape

    protected Shape shape

  The shape associated with this painter

### painters

    protected ShapePainter[] painters

  The enclosed `ShapePainter`s of this composite shape painter.

### count

    protected int count

  The number of shape painter.

Constructor Detail

### CompositeShapePainter

    public CompositeShapePainter(Shape shape)

  Constructs a new empty `CompositeShapePainter`.

Method Detail

### addShapePainter

    public void addShapePainter(ShapePainter shapePainter)

  Adds the specified shape painter to the shape painter..

  Parameters:
    `shapePainter` - the shape painter to add

### getShapePainter

    public ShapePainter getShapePainter(int index)

  Returns the shape painter at the specified index.

  Parameters:
    `index` - the index of the shape painter to return

### getShapePainterCount

    public int getShapePainterCount()

  Returns the number of shape painter of this composite shape painter.

### paint

    public void paint(Graphics2D g2d)

  Paints the specified shape using the specified Graphics2D.

  Specified by:
    `paint` in interface `ShapePainter`
  Parameters:
    `g2d` - the Graphics2D to use

### getPaintedArea

    public Shape getPaintedArea()

  Returns the area painted by this shape painter.

  Specified by:
    `getPaintedArea` in interface `ShapePainter`

### getPaintedBounds2D

    public Rectangle2D getPaintedBounds2D()

  Returns the bounds of the area painted by this shape painter

  Specified by:
    `getPaintedBounds2D` in interface `ShapePainter`

### inPaintedArea

    public boolean inPaintedArea(Point2D pt)

  Returns true if pt is in the area painted by this shape painter

  Specified by:
    `inPaintedArea` in interface `ShapePainter`

### getSensitiveArea

    public Shape getSensitiveArea()

  Returns the area covered by this shape painter (even if nothing is painted there).

  Specified by:
    `getSensitiveArea` in interface `ShapePainter`

### getSensitiveBounds2D

    public Rectangle2D getSensitiveBounds2D()

  Returns the bounds of the area painted by this shape painter

  Specified by:
    `getSensitiveBounds2D` in interface `ShapePainter`

### inSensitiveArea

    public boolean inSensitiveArea(Point2D pt)

  Returns true if pt is in the area painted by this shape painter

  Specified by:
    `inSensitiveArea` in interface `ShapePainter`

### setShape

    public void setShape(Shape shape)

  Sets the Shape this shape painter is associated with.

  Specified by:
    `setShape` in interface `ShapePainter`
  Parameters:
    `shape` - new shape this painter should be associated with. Should not be null.

### getShape

    public Shape getShape()

  Gets the Shape this shape painter is associated with.

  Specified by:
    `getShape` in interface `ShapePainter`
  Returns:
    shape associated with this painter

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.