Class ContentManager

java.lang.Object
org.apache.batik.bridge.svg12.ContentManager

public class ContentManager extends Object
A class to manage all XBL content elements in a shadow tree.
  • Field Details

    • shadowTree

      protected XBLOMShadowTreeElement shadowTree
      The shadow tree whose content elements this object is managing.
    • boundElement

      protected Element boundElement
      The bound element that owns the shadow tree.
    • xblManager

      protected DefaultXBLManager xblManager
      The XBL manager.
    • selectors

      protected HashMap selectors
      Map of content elements to selectors. [XBLContentElement, AbstractContentSelector]
    • selectedNodes

      protected HashMap selectedNodes
      Map of content elements to a list of nodes that were selected by that content element. [XBLContentElement, NodeList]
    • contentElementList

      protected LinkedList contentElementList
      List of content elements. [XBLContentElement]
    • removedNode

      protected Node removedNode
      The recently removed node from the shadow tree.
    • listeners

      protected HashMap listeners
      Map of XBLContentElement objects to EventListenerList objects.
    • contentElementDomAttrModifiedEventListener

      protected ContentManager.ContentElementDOMAttrModifiedEventListener contentElementDomAttrModifiedEventListener
      DOMAttrModified listener for content elements.
    • domAttrModifiedEventListener

      protected ContentManager.DOMAttrModifiedEventListener domAttrModifiedEventListener
      DOMAttrModified listener for bound element children.
    • domNodeInsertedEventListener

      protected ContentManager.DOMNodeInsertedEventListener domNodeInsertedEventListener
      DOMNodeInserted listener for bound element children.
    • domNodeRemovedEventListener

      protected ContentManager.DOMNodeRemovedEventListener domNodeRemovedEventListener
      DOMNodeRemoved listener for bound element children.
    • domSubtreeModifiedEventListener

      protected ContentManager.DOMSubtreeModifiedEventListener domSubtreeModifiedEventListener
      DOMSubtreeModified listener for shadow tree nodes.
    • shadowTreeNodeInsertedListener

      protected ContentManager.ShadowTreeNodeInsertedListener shadowTreeNodeInsertedListener
      DOMNodeInserted listener for content elements in the shadow tree.
    • shadowTreeNodeRemovedListener

      protected ContentManager.ShadowTreeNodeRemovedListener shadowTreeNodeRemovedListener
      DOMNodeRemoved listener for content elements in the shadow tree.
    • shadowTreeSubtreeModifiedListener

      protected ContentManager.ShadowTreeSubtreeModifiedListener shadowTreeSubtreeModifiedListener
      DOMSubtreeModified listener for content elements in the shadow tree.
  • Constructor Details

    • ContentManager

      public ContentManager(XBLOMShadowTreeElement s, XBLManager xm)
      Creates a new ContentManager object.
      Parameters:
      s - the shadow tree element whose content elements this object will be managing
      xm - the XBLManager for this document
  • Method Details

    • dispose

      public void dispose()
      Disposes this ContentManager.
    • getSelectedContent

      public NodeList getSelectedContent(XBLOMContentElement e)
      Returns a NodeList of the content that was selected by the given content element.
    • getContentElement

      protected XBLOMContentElement getContentElement(Node n)
      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

      protected void dispatchContentSelectionChangedEvent(XBLOMContentElement e)
      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

      protected boolean update(boolean first, Node n)
    • getContentSelectorLanguage

      protected String getContentSelectorLanguage(Element e)
      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.