Class DOMTreeModel

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

class DOMTreeModel extends Object implements TreeModel
  • Field Details

  • Constructor Details

    • DOMTreeModel

      DOMTreeModel(Document doc)
  • Method Details

    • addTreeModelListener

      public void addTreeModelListener(TreeModelListener l)
      Adds the specified TreeModel listener to receive TreeModel events from this component. If listener l is null, no exception is thrown and no action is performed.
      Specified by:
      addTreeModelListener in interface TreeModel
      Parameters:
      l - Contains the TreeModelListener for TreeModelEvent data.
    • removeTreeModelListener

      public void removeTreeModelListener(TreeModelListener l)
      Removes the specified TreeModel listener so that it no longer receives TreeModel events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.
      Specified by:
      removeTreeModelListener in interface TreeModel
      Parameters:
      l - Contains the TreeModelListener for TreeModelEvent data.
    • 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 child)
      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