## org.dom4j.swing
Class DocumentTreeModel

    java.lang.Object
      javax.swing.tree.DefaultTreeModel
          org.dom4j.swing.DocumentTreeModel

All Implemented Interfaces:
  Serializable, TreeModel

public class DocumentTreeModel
extends DefaultTreeModel

`DocumentTreeModel` implements a Swing TreeModel for a dom4j XML Document.

Version:
  $Revision: 1.7 $
Author:
  James Strachan , Jakob Jenkov
See Also:
  Serialized Form

Field Summary
`protected Document` `document` The document for this model

Fields inherited from class javax.swing.tree.DefaultTreeModel
`asksAllowsChildren, listenerList, root`

Constructor Summary
`DocumentTreeModel(Document document)`

Method Summary
`Document` `getDocument()` DOCUMENT ME!
`void` `setDocument(Document document)` Sets the `Document` instance that this `TreeModel` is based on

Methods inherited from class javax.swing.tree.DefaultTreeModel

`addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### document

    protected Document document

  The document for this model

Constructor Detail

### DocumentTreeModel

    public DocumentTreeModel(Document document)

Method Detail

### getDocument

    public Document getDocument()

  DOCUMENT ME!

  Returns:
    the `Document` instance that this `TreeModel` is based on

### setDocument

    public void setDocument(Document document)

  Sets the `Document` instance that this `TreeModel` is based on

  Parameters:
    `document` - DOCUMENT ME!

Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.