Class ContentManager


  • public class ContentManager
    extends java.lang.Object
    A class to manage all XBL content elements in a shadow tree.
    Version:
    $Id: ContentManager.java 1851346 2019-01-15 13:41:00Z ssteiner $
    • Field Detail

      • shadowTree

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

        protected org.w3c.dom.Element boundElement
        The bound element that owns the shadow tree.
      • selectors

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

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

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

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

        protected java.util.HashMap listeners
        Map of XBLContentElement objects to EventListenerList objects.
    • Constructor Detail

      • 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 Detail

      • dispose

        public void dispose()
        Disposes this ContentManager.
      • getSelectedContent

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

        protected XBLOMContentElement getContentElement​(org.w3c.dom.Node n)
        Returns the content element that selected a given node.
      • 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,
                                 org.w3c.dom.Node n)
      • getContentSelectorLanguage

        protected java.lang.String getContentSelectorLanguage​(org.w3c.dom.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.