Class CompositeShapePainter
java.lang.Object
org.apache.batik.gvt.CompositeShapePainter
- All Implemented Interfaces:
ShapePainter
A shape painter which consists of multiple shape painters.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of shape painter.protected ShapePainter[]The enclosedShapePainters of this composite shape painter.protected ShapeThe shape associated with this painter -
Constructor Summary
ConstructorsConstructorDescriptionCompositeShapePainter(Shape shape) Constructs a new emptyCompositeShapePainter. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddShapePainter(ShapePainter shapePainter) Adds the specified shape painter to the shape painter..Returns the area painted by this shape painter.Returns the bounds of the area painted by this shape painterReturns the area covered by this shape painter (even if nothing is painted there).Returns the bounds of the area painted by this shape paintergetShape()Gets the Shape this shape painter is associated with.getShapePainter(int index) Returns the shape painter at the specified index.intReturns the number of shape painter of this composite shape painter.booleaninPaintedArea(Point2D pt) Returns true if pt is in the area painted by this shape painterbooleanReturns true if pt is in the area painted by this shape paintervoidpaint(Graphics2D g2d) Paints the specified shape using the specified Graphics2D.voidSets the Shape this shape painter is associated with.
-
Field Details
-
shape
The shape associated with this painter -
painters
The enclosedShapePainters of this composite shape painter. -
count
protected int countThe number of shape painter.
-
-
Constructor Details
-
CompositeShapePainter
Constructs a new emptyCompositeShapePainter.
-
-
Method Details
-
addShapePainter
Adds the specified shape painter to the shape painter..- Parameters:
shapePainter- the shape painter to add
-
getShapePainter
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
Paints the specified shape using the specified Graphics2D.- Specified by:
paintin interfaceShapePainter- Parameters:
g2d- the Graphics2D to use
-
getPaintedArea
Returns the area painted by this shape painter.- Specified by:
getPaintedAreain interfaceShapePainter
-
getPaintedBounds2D
Returns the bounds of the area painted by this shape painter- Specified by:
getPaintedBounds2Din interfaceShapePainter
-
inPaintedArea
Returns true if pt is in the area painted by this shape painter- Specified by:
inPaintedAreain interfaceShapePainter
-
getSensitiveArea
Returns the area covered by this shape painter (even if nothing is painted there).- Specified by:
getSensitiveAreain interfaceShapePainter
-
getSensitiveBounds2D
Returns the bounds of the area painted by this shape painter- Specified by:
getSensitiveBounds2Din interfaceShapePainter
-
inSensitiveArea
Returns true if pt is in the area painted by this shape painter- Specified by:
inSensitiveAreain interfaceShapePainter
-
setShape
Sets the Shape this shape painter is associated with.- Specified by:
setShapein interfaceShapePainter- Parameters:
shape- new shape this painter should be associated with. Should not be null.
-
getShape
Gets the Shape this shape painter is associated with.- Specified by:
getShapein interfaceShapePainter- Returns:
- shape associated with this painter
-