org.apache.batik.bridge

Class SVGUseElementBridge

public class SVGUseElementBridge extends AbstractGraphicsNodeBridge

Bridge class for the <use> element.
Nested Class Summary
static classSVGUseElementBridge.CursorMouseOverListener
To handle a mouseover on an anchor and set the cursor.
protected classSVGUseElementBridge.ReferencedElementMutationListener
Used to handle modifications to the referenced content
Field Summary
protected SVGUseElementBridge.ReferencedElementMutationListenerl
Used to handle mutation of the referenced content.
protected BridgeContextsubCtx
The bridge context for the referenced document.
Constructor Summary
SVGUseElementBridge()
Constructs a new bridge for the <use> element.
Method Summary
CompositeGraphicsNodebuildCompositeGraphicsNode(BridgeContext ctx, Element e, CompositeGraphicsNode gn)
Creates a GraphicsNode from the input element and populates the input CompositeGraphicsNode
voidbuildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)
Builds using the specified BridgeContext and element, the specified graphics node.
protected AffineTransformcomputeTransform(SVGTransformable e, BridgeContext ctx)
Returns an AffineTransform that is the transformation to be applied to the node.
GraphicsNodecreateGraphicsNode(BridgeContext ctx, Element e)
Creates a GraphicsNode according to the specified parameters.
voiddispose()
BridgegetInstance()
Returns a new instance of this bridge.
StringgetLocalName()
Returns 'use'.
voidhandleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
Invoked when the animated value of an animatable attribute has changed.
protected GraphicsNodeinstantiateGraphicsNode()
Creates the GraphicsNode depending on the GraphicsNodeBridge implementation.
booleanisComposite()
Returns false as the <use> element is a not container.

Field Detail

l

protected SVGUseElementBridge.ReferencedElementMutationListener l
Used to handle mutation of the referenced content. This is only used in dynamic context and only for reference to local content.

subCtx

protected BridgeContext subCtx
The bridge context for the referenced document.

Constructor Detail

SVGUseElementBridge

public SVGUseElementBridge()
Constructs a new bridge for the <use> element.

Method Detail

buildCompositeGraphicsNode

public CompositeGraphicsNode buildCompositeGraphicsNode(BridgeContext ctx, Element e, CompositeGraphicsNode gn)
Creates a GraphicsNode from the input element and populates the input CompositeGraphicsNode

Parameters: ctx the bridge context to use e the element that describes the graphics node to build gn the CompositeGraphicsNode where the use graphical content will be appended. The composite node is emptied before appending new content.

buildGraphicsNode

public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)
Builds using the specified BridgeContext and element, the specified graphics node.

Parameters: ctx the bridge context to use e the element that describes the graphics node to build node the graphics node to build

computeTransform

protected AffineTransform computeTransform(SVGTransformable e, BridgeContext ctx)
Returns an AffineTransform that is the transformation to be applied to the node.

createGraphicsNode

public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e)
Creates a GraphicsNode according to the specified parameters.

Parameters: ctx the bridge context to use e the element that describes the graphics node to build

Returns: a graphics node that represents the specified element

dispose

public void dispose()

getInstance

public Bridge getInstance()
Returns a new instance of this bridge.

getLocalName

public String getLocalName()
Returns 'use'.

handleAnimatedAttributeChanged

public void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
Invoked when the animated value of an animatable attribute has changed.

instantiateGraphicsNode

protected GraphicsNode instantiateGraphicsNode()
Creates the GraphicsNode depending on the GraphicsNodeBridge implementation.

isComposite

public boolean isComposite()
Returns false as the <use> element is a not container.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.