public class ImageNode extends CompositeGraphicsNode
Modifier and Type | Field and Description |
---|---|
protected boolean |
hitCheckChildren |
backgroundEnableRgn, children, count, modCount, NULL_RECT, VIEWPORT
changeCompletedEvent, changeStartedEvent, clip, composite, enableBackgroundGraphicsNodeRable, filter, graphicsNodeRable, hints, inverseTransform, isVisible, listeners, mask, parent, pointerEventType, root, transform, weakRef
ALL, FILL, IDENTITY, NONE, PAINTED, STROKE, VISIBLE, VISIBLE_FILL, VISIBLE_PAINTED, VISIBLE_STROKE
Constructor and Description |
---|
ImageNode()
Constructs a new empty
ImageNode . |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.awt.geom.Point2D p)
Returns true if the specified Point2D is inside the boundary of this
node, false otherwise.
|
boolean |
getHitCheckChildren() |
GraphicsNode |
getImage()
Returns the graphics node that represents the image.
|
java.awt.geom.Rectangle2D |
getPrimitiveBounds()
Returns the bounds of the area covered by this node's primitive paint.
|
GraphicsNode |
nodeHitAt(java.awt.geom.Point2D p)
Returns the GraphicsNode containing point p if this node or one of its
children is sensitive to mouse events at p.
|
void |
paint(java.awt.Graphics2D g2d)
Paints this node.
|
void |
setHitCheckChildren(boolean hitCheckChildren)
If hitCheckChildren is true then nodeHitAt will return
child nodes of this image.
|
void |
setImage(GraphicsNode newImage)
Sets the graphics node that represents the image.
|
void |
setVisible(boolean isVisible)
Sets if this node is visible or not depending on the specified value.
|
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, toArray
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, setTransform
public void setVisible(boolean isVisible)
CompositeGraphicsNode
setVisible
in interface GraphicsNode
setVisible
in class CompositeGraphicsNode
isVisible
- If true this node is visiblepublic java.awt.geom.Rectangle2D getPrimitiveBounds()
CompositeGraphicsNode
getPrimitiveBounds
in interface GraphicsNode
getPrimitiveBounds
in class CompositeGraphicsNode
public void setHitCheckChildren(boolean hitCheckChildren)
public boolean getHitCheckChildren()
public void paint(java.awt.Graphics2D g2d)
paint
in interface GraphicsNode
paint
in class AbstractGraphicsNode
g2d
- the Graphics2D to usepublic boolean contains(java.awt.geom.Point2D p)
contains
in interface GraphicsNode
contains
in class CompositeGraphicsNode
p
- the specified Point2D in the user spacepublic GraphicsNode nodeHitAt(java.awt.geom.Point2D p)
nodeHitAt
in interface GraphicsNode
nodeHitAt
in class CompositeGraphicsNode
p
- the specified Point2D in the user spacepublic void setImage(GraphicsNode newImage)
newImage
- the new graphics node that represents the imagepublic GraphicsNode getImage()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.