Class ShapeNode
java.lang.Object
org.apache.batik.gvt.AbstractGraphicsNode
org.apache.batik.gvt.ShapeNode
- All Implemented Interfaces:
GraphicsNode
A graphics node that represents a shape.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ShapeThe shape that describes thisShapeNode.protected ShapePainterThe shape painter used to paint the shape of this shape node.Fields inherited from class AbstractGraphicsNode
changeCompletedEvent, changeStartedEvent, clip, composite, enableBackgroundGraphicsNodeRable, filter, graphicsNodeRable, hints, inverseTransform, isVisible, listeners, mask, parent, pointerEventType, root, transform, weakRefFields inherited from interface GraphicsNode
ALL, FILL, IDENTITY, NONE, PAINTED, STROKE, VISIBLE, VISIBLE_FILL, VISIBLE_PAINTED, VISIBLE_STROKE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the specified Point2D is inside the boundary of this node, false otherwise.Returns the bounds of the area covered by this node, without taking any of its rendering attribute into account.Returns the outline of this node.Returns the bounds of the area covered by this node's primitive paint.Returns the shape that represents the sensitive area of this graphics node.Returns the bounds of the sensitive area covered by this node, This includes the stroked area but does not include the effects of clipping, masking or filtering.getShape()Returns the shape of thisShapeNode.Returns theShapePainterused by this shape node to render its shape.booleanbooleanReturns true if the interior of this node intersects the interior of a specified Rectangle2D, false otherwise.protected voidInvalidates thisShapeNode.voidpaint(Graphics2D g2d) Paints this node.voidprimitivePaint(Graphics2D g2d) Paints this node without applying Filter, Mask, Composite, and clip.voidsetPointerEventType(int pointerEventType) Sets the type that describes how this graphics node reacts to events.voidSets the shape of thisShapeNode.voidsetShapePainter(ShapePainter newShapePainter) Sets theShapePainterused by this shape node to render its shape.Methods inherited from class AbstractGraphicsNode
fireGraphicsNodeChangeCompleted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, getBounds, getClip, getComposite, getEnableBackgroundGraphicsNodeRable, getFilter, getGlobalTransform, getGraphicsNodeRable, getInverseTransform, getMask, getParent, getPointerEventType, getRenderingHints, getRoot, getTransform, getTransformedBounds, getTransformedGeometryBounds, getTransformedPrimitiveBounds, getTransformedSensitiveBounds, getWeakReference, isAntialiasedClip, isOffscreenBufferNeeded, isVisible, nodeHitAt, normalizeRectangle, setClip, setComposite, setFilter, setMask, setParent, setRenderingHint, setRenderingHints, setRenderingHints, setRoot, setTransform, setVisible
-
Field Details
-
shape
The shape that describes thisShapeNode. -
shapePainter
The shape painter used to paint the shape of this shape node.
-
-
Constructor Details
-
ShapeNode
public ShapeNode()Constructs a new emptyShapeNode.
-
-
Method Details
-
setShape
Sets the shape of thisShapeNode.- Parameters:
newShape- the new shape of this shape node
-
getShape
Returns the shape of thisShapeNode. -
setShapePainter
Sets theShapePainterused by this shape node to render its shape.- Parameters:
newShapePainter- the new ShapePainter to use
-
getShapePainter
Returns theShapePainterused by this shape node to render its shape. -
paint
Paints this node.- Specified by:
paintin interfaceGraphicsNode- Overrides:
paintin classAbstractGraphicsNode- Parameters:
g2d- the Graphics2D to use
-
primitivePaint
Paints this node without applying Filter, Mask, Composite, and clip.- Parameters:
g2d- the Graphics2D to use
-
invalidateGeometryCache
protected void invalidateGeometryCache()Invalidates thisShapeNode. This node and all its ancestors have been informed that all its cached values related to its bounds must be recomputed.- Overrides:
invalidateGeometryCachein classAbstractGraphicsNode
-
setPointerEventType
public void setPointerEventType(int pointerEventType) Description copied from class:AbstractGraphicsNodeSets the type that describes how this graphics node reacts to events.- Specified by:
setPointerEventTypein interfaceGraphicsNode- Overrides:
setPointerEventTypein classAbstractGraphicsNode- Parameters:
pointerEventType- VISIBLE_PAINTED | VISIBLE_FILL | VISIBLE_STROKE | VISIBLE | PAINTED | FILL | STROKE | ALL | NONE
-
contains
Returns true if the specified Point2D is inside the boundary of this node, false otherwise.- Specified by:
containsin interfaceGraphicsNode- Overrides:
containsin classAbstractGraphicsNode- Parameters:
p- the specified Point2D in the user space
-
intersects
Returns true if the interior of this node intersects the interior of a specified Rectangle2D, false otherwise.- Specified by:
intersectsin interfaceGraphicsNode- Overrides:
intersectsin classAbstractGraphicsNode- Parameters:
r- the specified Rectangle2D in the user node space
-
getPrimitiveBounds
Returns the bounds of the area covered by this node's primitive paint. -
inSensitiveArea
-
getSensitiveBounds
Returns the bounds of the sensitive area covered by this node, This includes the stroked area but does not include the effects of clipping, masking or filtering. -
getSensitiveArea
Returns the shape that represents the sensitive area of this graphics node. -
getGeometryBounds
Returns the bounds of the area covered by this node, without taking any of its rendering attribute into account. That is, exclusive of any clipping, masking, filtering or stroking, for example. -
getOutline
Returns the outline of this node.
-