Package org.apache.batik.bridge.svg12
Class ContentManager
java.lang.Object
org.apache.batik.bridge.svg12.ContentManager
A class to manage all XBL content elements in a shadow tree.
- Version:
- $Id: ContentManager.java 1851346 2019-01-15 13:41:00Z ssteiner $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
The DOM EventListener invoked when an attribute is modified, for content elements.protected class
The DOM EventListener invoked when an attribute is modified.protected class
The DOM EventListener invoked when a node is added.protected class
The DOM EventListener invoked when a node is removed.protected class
The DOM EventListener invoked when a subtree has changed.protected class
The DOM EventListener invoked when a node in the shadow tree has been inserted.protected class
The DOM EventListener invoked when a node in the shadow tree has been removed.protected class
The DOM EventListener invoked when a subtree of the shadow tree has changed. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Element
The bound element that owns the shadow tree.DOMAttrModified listener for content elements.protected LinkedList
List of content elements.DOMAttrModified listener for bound element children.DOMNodeInserted listener for bound element children.DOMNodeRemoved listener for bound element children.DOMSubtreeModified listener for shadow tree nodes.protected HashMap
Map of XBLContentElement objects to EventListenerList objects.protected Node
The recently removed node from the shadow tree.protected HashMap
Map of content elements to a list of nodes that were selected by that content element.protected HashMap
Map of content elements to selectors.protected XBLOMShadowTreeElement
The shadow tree whose content elements this object is managing.DOMNodeInserted listener for content elements in the shadow tree.DOMNodeRemoved listener for content elements in the shadow tree.DOMSubtreeModified listener for content elements in the shadow tree.protected DefaultXBLManager
The XBL manager. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ContentManager object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified ContentSelectionChangedListener to the listener list.protected void
Dispatches the ContentSelectionChangedEvent to the registered listeners.void
dispose()
Disposes this ContentManager.protected XBLOMContentElement
Returns the content element that selected a given node.protected String
Returns the selector language to be used for the given xbl:content element.Returns a NodeList of the content that was selected by the given content element.void
Removes the specified ContentSelectionChangedListener from the listener list.protected void
update
(boolean first) Updates all content elements.protected boolean
-
Field Details
-
shadowTree
The shadow tree whose content elements this object is managing. -
boundElement
The bound element that owns the shadow tree. -
xblManager
The XBL manager. -
selectors
Map of content elements to selectors. [XBLContentElement, AbstractContentSelector] -
selectedNodes
Map of content elements to a list of nodes that were selected by that content element. [XBLContentElement, NodeList] -
contentElementList
List of content elements. [XBLContentElement] -
removedNode
The recently removed node from the shadow tree. -
listeners
Map of XBLContentElement objects to EventListenerList objects. -
contentElementDomAttrModifiedEventListener
protected ContentManager.ContentElementDOMAttrModifiedEventListener contentElementDomAttrModifiedEventListenerDOMAttrModified listener for content elements. -
domAttrModifiedEventListener
DOMAttrModified listener for bound element children. -
domNodeInsertedEventListener
DOMNodeInserted listener for bound element children. -
domNodeRemovedEventListener
DOMNodeRemoved listener for bound element children. -
domSubtreeModifiedEventListener
DOMSubtreeModified listener for shadow tree nodes. -
shadowTreeNodeInsertedListener
DOMNodeInserted listener for content elements in the shadow tree. -
shadowTreeNodeRemovedListener
DOMNodeRemoved listener for content elements in the shadow tree. -
shadowTreeSubtreeModifiedListener
DOMSubtreeModified listener for content elements in the shadow tree.
-
-
Constructor Details
-
ContentManager
Creates a new ContentManager object.- Parameters:
s
- the shadow tree element whose content elements this object will be managingxm
- the XBLManager for this document
-
-
Method Details
-
dispose
public void dispose()Disposes this ContentManager. -
getSelectedContent
Returns a NodeList of the content that was selected by the given content element. -
getContentElement
Returns the content element that selected a given node. -
addContentSelectionChangedListener
public void addContentSelectionChangedListener(XBLOMContentElement e, ContentSelectionChangedListener l) Adds the specified ContentSelectionChangedListener to the listener list. -
removeContentSelectionChangedListener
public void removeContentSelectionChangedListener(XBLOMContentElement e, ContentSelectionChangedListener l) Removes the specified ContentSelectionChangedListener from the listener list. -
dispatchContentSelectionChangedEvent
Dispatches the ContentSelectionChangedEvent to the registered listeners. -
update
protected void update(boolean first) Updates all content elements.- Parameters:
first
- Whether this is the first update for this ContentManager.
-
update
-
getContentSelectorLanguage
Returns the selector language to be used for the given xbl:content element. This will look at the xbl:content element and the document element for an attribute batik:selectorLanguage.
-