org.apache.batik.bridge
Interface BridgeContext

All Known Implementing Classes:
ConcreteBridgeContext

public interface BridgeContext

This class is the global context used by all Bridge instances.


Method Summary
 void bind(Element element, GraphicsNode node)
          Binds a GraphicsNode and an Element.
 void bind(Element element, StyleReference reference)
          Binds a style element to a style reference.
 Bridge getBridge(Element element)
          Returns the bridge associated with the specified element.
 Viewport getCurrentViewport()
          Returns the current viewport to use to compute percentages and units.
 DocumentLoader getDocumentLoader()
          Returns the document loader to use to load a document.
 Element getElement(GraphicsNode node)
          Returns the Element bound to the specified GraphicsNode if any.
 GraphicsNode getGraphicsNode(Element element)
          Returns the GraphicsNode bound to the specified Element if any.
 GraphicsNodeRableFactory getGraphicsNodeRableFactory()
          Returns a GraphicsNodeRable factory
 GVTBuilder getGVTBuilder()
          Returns the GVT builder that is currently used to build the GVT tree.
 GVTFactory getGVTFactory()
          Returns the GVT Factory that can be used to create GraphicsNode objects.
 InterpreterPool getInterpreterPool()
          Returns the interpreter pool that can be used for scripting.
 ParserFactory getParserFactory()
          Returns the Parser factory that can be used to parse the attributes of an Element.
 java.util.List getStyleReferenceList(Element element)
          Returns an enumeration of all style refence for the specified style element.
 UserAgent getUserAgent()
          Returns the UserAgent than can used by the bridge.
 ViewCSS getViewCSS()
          Returns the view CSS
 void putBridge(java.lang.String namespaceURI, java.lang.String localName, Bridge bridge)
          Associates the specified Bridge object with the specified namespace URI nad local name.
 void removeBridge(java.lang.String namespaceURI, java.lang.String localName)
          Removes the Bridge object associated to the specified namespace URI and local name.
 void setCurrentViewport(Viewport newViewport)
          Sets the current viewport to use to compute percentages and units to the specified SVG element.
 void setDocumentLoader(DocumentLoader newDocumentLoader)
          Sets the document loader to use to load a document.
 void setGraphicsNodeRableFactory(GraphicsNodeRableFactory f)
          Sets the GraphicsNodeRableFactory to use.
 void setGVTBuilder(GVTBuilder gvtBuilder)
          Sets the GVT builder used to build the GVT tree.
 void setGVTFactory(GVTFactory gvtFactory)
          Sets the GVT factory to use to create GraphicsNode
 void setParserFactory(ParserFactory parserFactory)
          Sets the Parser factory to use to parse XML attributes.
 void setUserAgent(UserAgent ua)
          Sets the User agent.
 void setViewCSS(ViewCSS viewCSS)
          Sets the view CSS.
 void unbind(Element element)
          UnBinds an Element and its graphics Node.
 

Method Detail

getInterpreterPool

public InterpreterPool getInterpreterPool()
Returns the interpreter pool that can be used for scripting.

getDocumentLoader

public DocumentLoader getDocumentLoader()
Returns the document loader to use to load a document.

getCurrentViewport

public Viewport getCurrentViewport()
Returns the current viewport to use to compute percentages and units.

setCurrentViewport

public void setCurrentViewport(Viewport newViewport)
Sets the current viewport to use to compute percentages and units to the specified SVG element.
Parameters:
newViewport - the new viewport

setDocumentLoader

public void setDocumentLoader(DocumentLoader newDocumentLoader)
Sets the document loader to use to load a document.
Parameters:
newDocumentLoader - the new document loader

getUserAgent

public UserAgent getUserAgent()
Returns the UserAgent than can used by the bridge.

getGVTBuilder

public GVTBuilder getGVTBuilder()
Returns the GVT builder that is currently used to build the GVT tree.

setGVTBuilder

public void setGVTBuilder(GVTBuilder gvtBuilder)
Sets the GVT builder used to build the GVT tree.

setUserAgent

public void setUserAgent(UserAgent ua)
Sets the User agent.

bind

public void bind(Element element,
                 GraphicsNode node)
Binds a GraphicsNode and an Element.

unbind

public void unbind(Element element)
UnBinds an Element and its graphics Node.

getGraphicsNode

public GraphicsNode getGraphicsNode(Element element)
Returns the GraphicsNode bound to the specified Element if any.

getViewCSS

public ViewCSS getViewCSS()
Returns the view CSS

setViewCSS

public void setViewCSS(ViewCSS viewCSS)
Sets the view CSS.

getElement

public Element getElement(GraphicsNode node)
Returns the Element bound to the specified GraphicsNode if any.

bind

public void bind(Element element,
                 StyleReference reference)
Binds a style element to a style reference. Several style reference can be bound to the same style element.

getStyleReferenceList

public java.util.List getStyleReferenceList(Element element)
Returns an enumeration of all style refence for the specified style element.

getBridge

public Bridge getBridge(Element element)
Returns the bridge associated with the specified element.

putBridge

public void putBridge(java.lang.String namespaceURI,
                      java.lang.String localName,
                      Bridge bridge)
Associates the specified Bridge object with the specified namespace URI nad local name.
Parameters:
namespaceURI - the namespace URI
localName - the local name
bridge - the bridge object

removeBridge

public void removeBridge(java.lang.String namespaceURI,
                         java.lang.String localName)
Removes the Bridge object associated to the specified namespace URI and local name.
Parameters:
namespaceURI - the namespace URI
localName - the local name

getGVTFactory

public GVTFactory getGVTFactory()
Returns the GVT Factory that can be used to create GraphicsNode objects.

setGVTFactory

public void setGVTFactory(GVTFactory gvtFactory)
Sets the GVT factory to use to create GraphicsNode
Parameters:
gvtFactory - the new gvt factory to use

getParserFactory

public ParserFactory getParserFactory()
Returns the Parser factory that can be used to parse the attributes of an Element.

setParserFactory

public void setParserFactory(ParserFactory parserFactory)
Sets the Parser factory to use to parse XML attributes.
Parameters:
parserFactory - the new parser factory to use

getGraphicsNodeRableFactory

public GraphicsNodeRableFactory getGraphicsNodeRableFactory()
Returns a GraphicsNodeRable factory

setGraphicsNodeRableFactory

public void setGraphicsNodeRableFactory(GraphicsNodeRableFactory f)
Sets the GraphicsNodeRableFactory to use.
Parameters:
f - the new GraphicsNodeRableFactory


Copyright © 2000 Apache Software Foundation. All Rights Reserved.