FileDocCategorySizeDatePackage
DOMTree.javaAPI DocApache Xerces 3.0.18984Fri Sep 14 20:33:56 BST 2007ui

DOMTree

public class DOMTree extends JTree
Displays a DOM document in a tree control.
author
Andy Clark, IBM
version
$Id: DOMTree.java 447689 2006-09-19 02:40:36Z mrglavas $

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public DOMTree()
Default constructor.


    //
    // Constructors
    //

       
      
        this(null);
        
public DOMTree(Document document)
Constructs a tree with the specified document.

        super(new Model());

        // set tree properties
        setRootVisible(false);

        // set properties
        setDocument(document);

        
Methods Summary
public org.w3c.dom.DocumentgetDocument()
Returns the document.

        return ((Model)getModel()).getDocument();
        
public org.w3c.dom.NodegetNode(java.lang.Object treeNode)
get the org.w3c.Node for a MutableTreeNode.

        return ((Model)getModel()).getNode(treeNode);
    
public voidsetDocument(org.w3c.dom.Document document)
Sets the document.

        ((Model)getModel()).setDocument(document);
        expandRow(0);