org.apache.batik.bridge.svg12

Class BindableElementBridge

public class BindableElementBridge extends AbstractGraphicsNodeBridge implements SVG12BridgeUpdateHandler

Bridge class for foreign namespace elements that can be bound with sXBL.
Constructor Summary
BindableElementBridge()
Constructs a new bridge for custom elements.
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.
GraphicsNodecreateGraphicsNode(BridgeContext ctx, Element e)
Creates a GraphicsNode according to the specified parameters.
voiddispose()
BridgegetInstance()
Returns a new instance of this bridge.
StringgetLocalName()
Returns "*" to indicate a default bridge.
StringgetNamespaceURI()
Returns "*" to indicate a default bridge.
voidhandleBindingEvent(Element bindableElement, Element shadowTree)
Invoked when a bindable element's binding has changed.
voidhandleContentSelectionChangedEvent(ContentSelectionChangedEvent csce)
Invoked when the xblChildNodes property has changed because a descendant xbl:content element has updated its selected nodes.
voidhandleDOMNodeInsertedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeInserted' is fired.
protected voidhandleElementAdded(CompositeGraphicsNode gn, Node parent, Element childElt)
Rebuild the graphics tree.
protected GraphicsNodeinstantiateGraphicsNode()
Creates the GraphicsNode depending on the GraphicsNodeBridge implementation.
booleanisComposite()
Returns false as the custom element is a not container.

Constructor Detail

BindableElementBridge

public BindableElementBridge()
Constructs a new bridge for custom elements.

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

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 "*" to indicate a default bridge.

getNamespaceURI

public String getNamespaceURI()
Returns "*" to indicate a default bridge.

handleBindingEvent

public void handleBindingEvent(Element bindableElement, Element shadowTree)
Invoked when a bindable element's binding has changed.

handleContentSelectionChangedEvent

public void handleContentSelectionChangedEvent(ContentSelectionChangedEvent csce)
Invoked when the xblChildNodes property has changed because a descendant xbl:content element has updated its selected nodes.

handleDOMNodeInsertedEvent

public void handleDOMNodeInsertedEvent(MutationEvent evt)
Invoked when an MutationEvent of type 'DOMNodeInserted' is fired.

handleElementAdded

protected void handleElementAdded(CompositeGraphicsNode gn, Node parent, Element childElt)
Rebuild the graphics tree.

instantiateGraphicsNode

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

isComposite

public boolean isComposite()
Returns false as the custom element is a not container.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.