Class ImageNode
java.lang.Object
org.apache.batik.gvt.AbstractGraphicsNode
org.apache.batik.gvt.CompositeGraphicsNode
org.apache.batik.gvt.ImageNode
- All Implemented Interfaces:
Iterable, Collection, List, SequencedCollection, GraphicsNode
A graphics node that represents an image described as a graphics node.
- Version:
- $Id$
-
Field Summary
FieldsFields inherited from class CompositeGraphicsNode
backgroundEnableRgn, children, count, modCount, NULL_RECT, VIEWPORTFields inherited from class AbstractGraphicsNode
changeCompletedEvent, changeStartedEvent, clip, composite, enableBackgroundGraphicsNodeRable, EPSILON, 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.booleangetImage()Returns the graphics node that represents the image.Returns the bounds of the area covered by this node's primitive paint.Returns the GraphicsNode containing point p if this node or one of its children is sensitive to mouse events at p.voidpaint(Graphics2D g2d) Paints this node.voidsetHitCheckChildren(boolean hitCheckChildren) If hitCheckChildren is true then nodeHitAt will return child nodes of this image.voidsetImage(GraphicsNode newImage) Sets the graphics node that represents the image.voidsetVisible(boolean isVisible) Sets if this node is visible or not depending on the specified value.Methods inherited from class CompositeGraphicsNode
add, add, addAll, addAll, clear, contains, containsAll, ensureCapacity, get, getBackgroundEnable, getChildren, getGeometryBounds, getOutline, getSensitiveBounds, getTransformedBBox, getTransformedGeometryBounds, getTransformedPrimitiveBounds, getTransformedSensitiveBounds, indexOf, invalidateGeometryCache, isEmpty, iterator, lastIndexOf, listIterator, listIterator, primitivePaint, remove, remove, removeAll, retainAll, set, setBackgroundEnable, setRoot, size, subList, toArray, toArrayMethods inherited from class AbstractGraphicsNode
fireGraphicsNodeChangeCompleted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, getBounds, getClip, getComposite, getEnableBackgroundGraphicsNodeRable, getFilter, getGlobalTransform, getGraphicsNodeRable, getInverseTransform, getMask, getParent, getPointerEventType, getRenderingHints, getRoot, getTransform, getTransformedBounds, getWeakReference, intersects, isAntialiasedClip, isOffscreenBufferNeeded, isVisible, normalizeRectangle, setClip, setComposite, setFilter, setMask, setParent, setPointerEventType, setRenderingHint, setRenderingHints, setRenderingHints, setTransformMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
hitCheckChildren
protected boolean hitCheckChildren
-
-
Constructor Details
-
ImageNode
public ImageNode()Constructs a new emptyImageNode.
-
-
Method Details
-
setVisible
public void setVisible(boolean isVisible) Description copied from class:CompositeGraphicsNodeSets if this node is visible or not depending on the specified value. Don't fire a graphicsNodeChange event because this doesn't really effect us (it effects our children through CSS inheritence).- Specified by:
setVisiblein interfaceGraphicsNode- Overrides:
setVisiblein classCompositeGraphicsNode- Parameters:
isVisible- If true this node is visible
-
getPrimitiveBounds
Description copied from class:CompositeGraphicsNodeReturns the bounds of the area covered by this node's primitive paint.- Specified by:
getPrimitiveBoundsin interfaceGraphicsNode- Overrides:
getPrimitiveBoundsin classCompositeGraphicsNode
-
setHitCheckChildren
public void setHitCheckChildren(boolean hitCheckChildren) If hitCheckChildren is true then nodeHitAt will return child nodes of this image. Otherwise it will only return this node (if the point is in the image). -
getHitCheckChildren
public boolean getHitCheckChildren() -
paint
Paints this node.- Specified by:
paintin interfaceGraphicsNode- Overrides:
paintin classAbstractGraphicsNode- Parameters:
g2d- the Graphics2D to use
-
contains
Returns true if the specified Point2D is inside the boundary of this node, false otherwise.- Specified by:
containsin interfaceGraphicsNode- Overrides:
containsin classCompositeGraphicsNode- Parameters:
p- the specified Point2D in the user space
-
nodeHitAt
Returns the GraphicsNode containing point p if this node or one of its children is sensitive to mouse events at p.- Specified by:
nodeHitAtin interfaceGraphicsNode- Overrides:
nodeHitAtin classCompositeGraphicsNode- Parameters:
p- the specified Point2D in the user space
-
setImage
Sets the graphics node that represents the image.- Parameters:
newImage- the new graphics node that represents the image
-
getImage
Returns the graphics node that represents the image.
-