Class DOMTreeModel

java.lang.Object
org.xhtmlrenderer.swing.DOMTreeModel
All Implemented Interfaces:
TreeModel

class DOMTreeModel extends Object implements TreeModel
  • Field Details

    • root

      private Node root
      Our root for display
    • displayableNodes

      private final Map<Object,List<Node>> displayableNodes
  • Constructor Details

    • DOMTreeModel

      DOMTreeModel(Document doc)
  • Method Details

    • addTreeModelListener

      public void addTreeModelListener(TreeModelListener l)
      Specified by:
      addTreeModelListener in interface TreeModel
    • removeTreeModelListener

      public void removeTreeModelListener(TreeModelListener l)
      Specified by:
      removeTreeModelListener in interface TreeModel
    • valueForPathChanged

      public void valueForPathChanged(TreePath path, Object newValue)
      Specified by:
      valueForPathChanged in interface TreeModel
    • getChild

      public Object getChild(Object parent, int index)
      Gets the child attribute of the DOMTreeModel object
      Specified by:
      getChild in interface TreeModel
    • getChildCount

      public int getChildCount(Object parent)
      Gets the childCount attribute of the DOMTreeModel object
      Specified by:
      getChildCount in interface TreeModel
    • getIndexOfChild

      public int getIndexOfChild(Object parent, Object childNode)
      Gets the indexOfChild attribute of the DOMTreeModel object
      Specified by:
      getIndexOfChild in interface TreeModel
    • getRoot

      public Object getRoot()
      Gets the root attribute of the DOMTreeModel object
      Specified by:
      getRoot in interface TreeModel
      Returns:
      The root value
    • isLeaf

      public boolean isLeaf(Object nd)
      Gets the leaf attribute of the DOMTreeModel object
      Specified by:
      isLeaf in interface TreeModel
    • addDisplayable

      private List<Node> addDisplayable(Node parent)
      Adds a feature to the Displayable attribute of the DOMTreeModel object
      Parameters:
      parent - The feature to be added to the Displayable attribute