org.apache.batik.svggen
public class DOMTreeManager extends Object implements SVGSyntax, ErrorConstants
Field Summary | |
---|---|
protected SVGBufferedImageOp | filterConverter
Converters used bVy this object to translate graphic context
attributes |
protected SVGGeneratorContext | generatorContext
The context that stores the domFactory, the imageHandler
and the extensionHandler. |
protected List | genericDefSet
Set of definitions that are to be placed at the top of the
document tree |
protected List | groupManagers
Set of group managers that build groups for
this manager.
|
protected List | otherDefs
Set of definitions which can be used by custom extensions |
protected Element | topLevelGroup
Top level group |
Constructor Summary | |
---|---|
DOMTreeManager(GraphicContext gc, SVGGeneratorContext generatorContext, int maxGCOverrides)
Constructor |
Method Summary | |
---|---|
void | addGroupManager(DOMGroupManager groupManager) |
void | addOtherDef(Element definition)
Lets custom implementations for various extensions add
elements to the |
void | appendGroup(Element group, DOMGroupManager groupManager)
When a group is appended to the tree by this call, all the
other group managers are requested to start new groups, in
order to preserve the Z-order.
|
void | applyDefaultRenderingStyle(Element element) |
List | getDefinitionSet()
Invoking this method will return a set of definition element that
contain all the definitions referenced by the attributes generated by
the various converters. |
ExtensionHandler | getExtensionHandler() |
SVGBufferedImageOp | getFilterConverter() |
Element | getGenericDefinitions() |
SVGGraphicContextConverter | getGraphicContextConverter() |
Element | getRoot()
Returns the root element with the generic definitions and
the topLevelGroup. |
Element | getRoot(Element svgElement)
Returns the root element with the generic definitions and
the topLevelGroup. |
Element | getTopLevelGroup()
Invoking this method will return a reference to the topLevelGroup
Element managed by this object. |
Element | getTopLevelGroup(boolean includeDefinitionSet)
Invoking this method will return a reference to the topLevelGroup
Element managed by this object. |
protected void | recycleTopLevelGroup()
Reset the state of this object to handler a new topLevelGroup |
protected void | recycleTopLevelGroup(boolean recycleConverters)
Reset the state of this object to handler a new topLevelGroup |
void | removeGroupManager(DOMGroupManager groupManager) |
void | setTopLevelGroup(Element topLevelGroup)
Sets the topLevelGroup to the input element. |
Parameters: gc default graphic context state generatorContext the SVG generator context maxGCOverrides defines how many overrides are allowed in children nodes of the current group.
Parameters: groupManager new DOMGroupManager to add to the list of managers that collaborate with this tree manager.
Parameters: group new group to be appended to the topLevelGroup groupManager DOMTreeManager that produced the group.
Returns: the extension handler used by the DOMTreeManager.
Returns: a defs element that contains all the generic definitions
Returns: top level group
Parameters: includeDefinitionSet if true, the definition set is included and the converters are reset (i.e., they start with an empty set of definitions).
Returns: top level group
Parameters: groupManager DOMGroupManager to remove from the list of managers that collaborate with this tree manager