org.apache.batik.bridge

Class SVGSwitchElementBridge

public class SVGSwitchElementBridge extends SVGGElementBridge

Bridge class for the <switch> element.
Field Summary
protected ElementselectedChild
The child element that was chosen for rendering according to the test attributes.
Constructor Summary
SVGSwitchElementBridge()
Constructs a new bridge for the <switch> element.
Method Summary
GraphicsNodecreateGraphicsNode(BridgeContext ctx, Element e)
Creates a GraphicsNode according to the specified parameters.
voiddispose()
Disposes this BridgeUpdateHandler and releases all resources.
BridgegetInstance()
Returns a new instance of this bridge.
StringgetLocalName()
Returns 'switch'.
protected voidhandleChildElementRemoved(Element e)
Responds to the removal of a child element by re-evaluating the test attributes.
protected voidhandleElementAdded(CompositeGraphicsNode gn, Node parent, Element childElt)
Responds to the insertion of a child element by re-evaluating the test attributes.
booleanisComposite()
Returns true as the <switch> element is not a container.

Field Detail

selectedChild

protected Element selectedChild
The child element that was chosen for rendering according to the test attributes.

Constructor Detail

SVGSwitchElementBridge

public SVGSwitchElementBridge()
Constructs a new bridge for the <switch> element.

Method Detail

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()
Disposes this BridgeUpdateHandler and releases all resources.

getInstance

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

getLocalName

public String getLocalName()
Returns 'switch'.

handleChildElementRemoved

protected void handleChildElementRemoved(Element e)
Responds to the removal of a child element by re-evaluating the test attributes.

handleElementAdded

protected void handleElementAdded(CompositeGraphicsNode gn, Node parent, Element childElt)
Responds to the insertion of a child element by re-evaluating the test attributes.

isComposite

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