public class XMLTreeModel extends java.lang.Object implements javax.swing.tree.TreeModel
Modifier and Type | Class and Description |
---|---|
static class |
XMLTreeModel.XMLAdapterNode |
Constructor and Description |
---|
XMLTreeModel(org.w3c.dom.Document doc) |
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
|
void |
fireTreeNodesChanged(javax.swing.event.TreeModelEvent e) |
void |
fireTreeNodesInserted(javax.swing.event.TreeModelEvent e) |
void |
fireTreeNodesRemoved(javax.swing.event.TreeModelEvent e) |
void |
fireTreeStructureChanged(javax.swing.event.TreeModelEvent e) |
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child) |
java.lang.Object |
getRoot() |
boolean |
isLeaf(java.lang.Object node) |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes a listener previously added with addTreeModelListener().
|
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue) |
public XMLTreeModel(org.w3c.dom.Document doc)
public java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
public int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
public boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface javax.swing.tree.TreeModel
l
- the listener to addremoveTreeModelListener(javax.swing.event.TreeModelListener)
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
l
- the listener to removeaddTreeModelListener(javax.swing.event.TreeModelListener)
public void fireTreeNodesChanged(javax.swing.event.TreeModelEvent e)
public void fireTreeNodesInserted(javax.swing.event.TreeModelEvent e)
public void fireTreeNodesRemoved(javax.swing.event.TreeModelEvent e)
public void fireTreeStructureChanged(javax.swing.event.TreeModelEvent e)