org.apache.batik.gvt
Class ProxyGraphicsNode

java.lang.Object
  |
  +--org.apache.batik.gvt.AbstractGraphicsNode
        |
        +--org.apache.batik.gvt.ProxyGraphicsNode
All Implemented Interfaces:
java.lang.Cloneable, GraphicsNode

public class ProxyGraphicsNode
extends AbstractGraphicsNode

A graphics node which provides a placeholder for another graphics node. This node is self defined except that it delegates to the enclosed (proxied) graphics node, its paint routine and bounds computation.


Field Summary
protected  GraphicsNode source
          The graphics node to proxy.
 
Fields inherited from class org.apache.batik.gvt.AbstractGraphicsNode
clip, composite, filter, gnr, hints, hitDetector, inverseTransform, isVisible, listeners, mask, parent, root, transform
 
Fields inherited from interface org.apache.batik.gvt.GraphicsNode
IDENTITY
 
Constructor Summary
ProxyGraphicsNode()
          Constructs a new empty proxy graphics node.
 
Method Summary
 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.Shape getOutline(GraphicsNodeRenderContext rc)
          Returns the outline of this node.
 java.awt.geom.Rectangle2D getPrimitiveBounds(GraphicsNodeRenderContext rc)
          Returns the bounds of the area covered by this node's primitive paint.
 GraphicsNode getSource()
          Returns the proxied graphics node.
 void primitivePaint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext rc)
          Paints this node without applying Filter, Mask, Composite and clip.
 void setSource(GraphicsNode source)
          Sets the graphics node to proxy to the specified graphics node.
 
Methods inherited from class org.apache.batik.gvt.AbstractGraphicsNode
acceptEvent, addGraphicsNodeKeyListener, addGraphicsNodeMouseListener, contains, dispatchEvent, getBounds, getClip, getComposite, getFilter, getGlobalTransform, getGraphicsNodeHitDetector, getInverseTransform, getListeners, getMask, getParent, getRenderingHints, getRoot, getTransform, getTransformedBounds, getTransformedGeometryBounds, getTransformedPrimitiveBounds, intersects, invalidateGeometryCache, isAntialiasedClip, isOffscreenBufferNeeded, isVisible, nodeHitAt, paint, processKeyEvent, processMouseEvent, removeGraphicsNodeKeyListener, removeGraphicsNodeMouseListener, renderingClone, setClip, setComposite, setFilter, setGraphicsNodeHitDetector, setMask, setParent, setRenderingHint, setRenderingHints, setRenderingHints, setRoot, setTransform, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected GraphicsNode source
The graphics node to proxy.
Constructor Detail

ProxyGraphicsNode

public ProxyGraphicsNode()
Constructs a new empty proxy graphics node.
Method Detail

setSource

public void setSource(GraphicsNode source)
Sets the graphics node to proxy to the specified graphics node.
Parameters:
source - the graphics node to proxy

getSource

public GraphicsNode getSource()
Returns the proxied graphics node.

primitivePaint

public void primitivePaint(java.awt.Graphics2D g2d,
                           GraphicsNodeRenderContext rc)
Paints this node without applying Filter, Mask, Composite and clip.
Parameters:
g2d - the Graphics2D to use
rc - the GraphicsNodeRenderContext to use

getPrimitiveBounds

public java.awt.geom.Rectangle2D getPrimitiveBounds(GraphicsNodeRenderContext rc)
Returns the bounds of the area covered by this node's primitive paint. ie. the proxied graphics node's bounds. Note: The boundaries of some nodes (notably, text element nodes) cannot be precisely determined independent of their GraphicsNodeRenderContext.
Parameters:
rc - the GraphicsNodeRenderContext for which this dimension applies

getGeometryBounds

public 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. Note: The boundaries of some nodes (notably, text element nodes) cannot be precisely determined independent of their GraphicsNodeRenderContext.
Parameters:
rc - the GraphicsNodeRenderContext for which this dimension applies

getOutline

public java.awt.Shape getOutline(GraphicsNodeRenderContext rc)
Returns the outline of this node.
Following copied from interface: org.apache.batik.gvt.GraphicsNode
Parameters:
rc - the GraphicsNodeRenderContext for which this dimension applies
Returns:
the outline of this node


Copyright © 2001 Apache Software Foundation. All Rights Reserved.