|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The base class for all graphics nodes. A GraphicsNode encapsulates graphical attributes and can perform atomic operations of a complex rendering.
Field Summary | |
static java.awt.geom.AffineTransform |
IDENTITY
The identity affine transform matrix used to draw renderable images. |
Method Summary | |
void |
addGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
Adds the specified graphics node key listener to receive graphics node key events from this node. |
void |
addGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
Adds the specified graphics node mouse listener to receive graphics node mouse events from this node. |
boolean |
contains(java.awt.geom.Point2D p,
GraphicsNodeRenderContext rc)
Tests if the specified Point2D is inside the boundary of this node. |
void |
dispatchEvent(GraphicsNodeEvent evt)
Dispatches the specified event to the interested registered listeners. |
java.awt.geom.Rectangle2D |
getBounds(GraphicsNodeRenderContext rc)
Returns the bounds of this node in user space. |
ClipRable |
getClip()
Returns the clipping filter of this node or null if any. |
java.awt.Composite |
getComposite()
Returns the composite of this node. |
Filter |
getFilter()
Returns the filter of this node or null if any. |
java.awt.geom.Rectangle2D |
getGeometryBounds(GraphicsNodeRenderContext rc)
Returns the bounds of the area covered by this node, without taking any of its rendering attribute into account, i.e., exclusive of any clipping, masking, filtering or stroking, for example. |
java.awt.geom.AffineTransform |
getGlobalTransform()
Returns the concatenated transform of this node. |
GraphicsNodeHitDetector |
getGraphicsNodeHitDetector()
Returns the hit detector for this node. |
java.awt.geom.AffineTransform |
getInverseTransform()
Returns the inverse transform for this node. |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Returns an array of listeners that were added to this node and of the specified type. |
Mask |
getMask()
Returns the mask of this node or null if any. |
java.awt.Shape |
getOutline(GraphicsNodeRenderContext rc)
Returns the outline of this node. |
CompositeGraphicsNode |
getParent()
Returns the parent of this node or null if any. |
java.awt.geom.Rectangle2D |
getPrimitiveBounds(GraphicsNodeRenderContext rc)
Returns the bounds of the area covered by this node's primitive paint. |
java.awt.RenderingHints |
getRenderingHints()
Returns the rendering hints of this node or null if any. |
RootGraphicsNode |
getRoot()
Returns the root of the GVT tree or null if
the node is not part of a GVT tree. |
java.awt.geom.AffineTransform |
getTransform()
Returns the transform of this node. |
java.awt.geom.Rectangle2D |
getTransformedBounds(java.awt.geom.AffineTransform txf,
GraphicsNodeRenderContext rc)
Returns the bounds of this node after applying the input transform (if any), concatenated with this node's transform (if any). |
java.awt.geom.Rectangle2D |
getTransformedGeometryBounds(java.awt.geom.AffineTransform txf,
GraphicsNodeRenderContext rc)
Returns the bounds of the area covered by this node, without taking any of its rendering attribute into account, i.e., exclusive of any clipping, masking, filtering or stroking, for example. |
java.awt.geom.Rectangle2D |
getTransformedPrimitiveBounds(java.awt.geom.AffineTransform txf,
GraphicsNodeRenderContext rc)
Returns the bounds of this node's primitivePaint after applying the input transform (if any), concatenated with this node's transform (if any). |
boolean |
intersects(java.awt.geom.Rectangle2D r,
GraphicsNodeRenderContext rc)
Tests if the interior of this node intersects the interior of a specified Rectangle2D. |
boolean |
isVisible()
Determines whether or not this node is visible when its parent is visible. |
GraphicsNode |
nodeHitAt(java.awt.geom.Point2D p,
GraphicsNodeRenderContext rc)
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,
GraphicsNodeRenderContext rc)
Paints this node. |
void |
primitivePaint(java.awt.Graphics2D g2d,
GraphicsNodeRenderContext rc)
Paints this node without applying Filter, Mask, Composite and clip. |
void |
processKeyEvent(GraphicsNodeKeyEvent evt)
Dispatches a graphics node key event to this node or one of its child. |
void |
processMouseEvent(GraphicsNodeMouseEvent evt)
Dispatches a graphics node mouse event to this node or one of its child. |
void |
removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
Removes the specified graphics node key listener so that it no longer receives graphics node key events from this node. |
void |
removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
Removes the specified graphics node mouse listener so that it no longer receives graphics node mouse events from this node. |
GraphicsNode |
renderingClone()
Returns a deep clone of this graphics node. |
void |
setClip(ClipRable newClipper)
Sets the clipping filter for this node. |
void |
setComposite(java.awt.Composite newComposite)
Sets the composite of this node. |
void |
setFilter(Filter newFilter)
Sets the filter of this node. |
void |
setGraphicsNodeHitDetector(GraphicsNodeHitDetector hitDetector)
Sets the hit detector for this node. |
void |
setMask(Mask newMask)
Sets the mask of this node. |
void |
setRenderingHint(java.awt.RenderingHints.Key key,
java.lang.Object value)
Maps the specified key to the specified value in the rendering hints of this node. |
void |
setRenderingHints(java.util.Map hints)
Copies all of the mappings from the specified Map to the rendering hints of this node. |
void |
setRenderingHints(java.awt.RenderingHints newHints)
Sets the rendering hints of this node. |
void |
setTransform(java.awt.geom.AffineTransform newTransform)
Sets the transform of this node. |
void |
setVisible(boolean isVisible)
Sets if this node is visible or not depending on the specified value. |
Field Detail |
public static final java.awt.geom.AffineTransform IDENTITY
Method Detail |
public void setTransform(java.awt.geom.AffineTransform newTransform)
newTransform
- the new transform of this nodepublic java.awt.geom.AffineTransform getTransform()
public java.awt.geom.AffineTransform getInverseTransform()
public java.awt.geom.AffineTransform getGlobalTransform()
public void setComposite(java.awt.Composite newComposite)
composite
- the composite of this nodepublic java.awt.Composite getComposite()
public void setVisible(boolean isVisible)
isVisible
- If true this node is visiblepublic boolean isVisible()
public void setClip(ClipRable newClipper)
newClipper
- the new clipping filter of this nodepublic ClipRable getClip()
public void setRenderingHint(java.awt.RenderingHints.Key key, java.lang.Object value)
key
- the key of the hint to be setvalue
- the value indicating preferences for the specified
hint category.public void setRenderingHints(java.util.Map hints)
hints
- the rendering hints to be setpublic void setRenderingHints(java.awt.RenderingHints newHints)
newHints
- the new rendering hints of this nodepublic java.awt.RenderingHints getRenderingHints()
public void setMask(Mask newMask)
newMask
- the new mask of this nodepublic Mask getMask()
public void setFilter(Filter newFilter)
newFilter
- the new filter of this nodepublic Filter getFilter()
public void paint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext rc)
g2d
- the Graphics2D to userc
- the GraphicsNodeRenderContext to use
was interrupted during paintpublic void primitivePaint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext rc)
g2d
- the Graphics2D to userc
- the GraphicsNodeRenderContext to usepublic void dispatchEvent(GraphicsNodeEvent evt)
evt
- the event to dispatchpublic void addGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
l
- the graphics node mouse listener to addpublic void removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
l
- the graphics node mouse listener to removepublic void addGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
l
- the graphics node key listener to addpublic void removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
l
- the graphics node key listener to removepublic void setGraphicsNodeHitDetector(GraphicsNodeHitDetector hitDetector)
hitDetector
- the new hit detectorpublic GraphicsNodeHitDetector getGraphicsNodeHitDetector()
public void processMouseEvent(GraphicsNodeMouseEvent evt)
evt
- the evt to dispatchpublic void processKeyEvent(GraphicsNodeKeyEvent evt)
evt
- the evt to dispatchpublic java.util.EventListener[] getListeners(java.lang.Class listenerType)
listenerType
- the type of the listeners to returnpublic CompositeGraphicsNode getParent()
public RootGraphicsNode getRoot()
null
if
the node is not part of a GVT tree.public java.awt.geom.Rectangle2D getBounds(GraphicsNodeRenderContext rc)
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic java.awt.geom.Rectangle2D getTransformedBounds(java.awt.geom.AffineTransform txf, GraphicsNodeRenderContext rc)
txf
- the affine transform with which this node's transform should
be concatenated. Should not be null.rc
- the GraphicsNodeRenderContextpublic java.awt.geom.Rectangle2D getPrimitiveBounds(GraphicsNodeRenderContext rc)
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic java.awt.geom.Rectangle2D getTransformedPrimitiveBounds(java.awt.geom.AffineTransform txf, GraphicsNodeRenderContext rc)
txf
- the affine transform with which this node's transform should
be concatenated. Should not be null.rc
- the GraphicsNodeRenderContextpublic java.awt.geom.Rectangle2D getGeometryBounds(GraphicsNodeRenderContext rc)
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic java.awt.geom.Rectangle2D getTransformedGeometryBounds(java.awt.geom.AffineTransform txf, GraphicsNodeRenderContext rc)
txf
- the affine transform with which this node's transform should
be concatenated. Should not be null.rc
- the GraphicsNodeRenderContextpublic boolean contains(java.awt.geom.Point2D p, GraphicsNodeRenderContext rc)
p
- the specified Point2D in the user spacerc
- the GraphicsNodeRenderContext for which this dimension appliespublic boolean intersects(java.awt.geom.Rectangle2D r, GraphicsNodeRenderContext rc)
r
- the specified Rectangle2D in the user node spacerc
- the GraphicsNodeRenderContext for which this dimension appliespublic GraphicsNode nodeHitAt(java.awt.geom.Point2D p, GraphicsNodeRenderContext rc)
p
- the specified Point2D in the user spacerc
- the GraphicsNodeRenderContext for which this dimension appliespublic java.awt.Shape getOutline(GraphicsNodeRenderContext rc)
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic GraphicsNode renderingClone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |