org.autoplot.spase.DOMTreeWalkerTreeModel

This class implements the Swing TreeModel interface so that the DOM tree returned by a TreeWalker can be displayed in a JTree component.

DOMTreeWalkerTreeModel( org.w3c.dom.traversal.TreeWalker walker )

Create a TreeModel for the specified TreeWalker

DOMTreeWalkerTreeModel( org.w3c.dom.Document document )

Create a TreeModel for a TreeWalker that returns all nodes in the specified document

DOMTreeWalkerTreeModel( org.w3c.dom.Element element )

Create a TreeModel for a TreeWalker that returns the specified element and all of its descendant nodes.


addTreeModelListener

addTreeModelListener( javax.swing.event.TreeModelListener l ) → void

Parameters

l - a TreeModelListener

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


getChild

getChild( Object parent, int index ) → Object

Parameters

parent - an Object
index - an int

Returns:

java.lang.Object

[search for examples] [view on GitHub] [view on old javadoc]


getChildCount

getChildCount( Object node ) → int

Parameters

node - an Object

Returns:

int

[search for examples] [view on GitHub] [view on old javadoc]


getIndexOfChild

getIndexOfChild( Object parent, Object child ) → int

Parameters

parent - an Object
child - an Object

Returns:

int

[search for examples] [view on GitHub] [view on old javadoc]


getRoot

getRoot( ) → Object

Returns:

java.lang.Object

[search for examples] [view on GitHub] [view on old javadoc]


isLeaf

isLeaf( Object node ) → boolean

Parameters

node - an Object

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc]


main

main( java.lang.String[][] args ) → void

This main() method demonstrates the use of this class, the use of the Xerces DOM parser, and the creation of a DOM Level 2 TreeWalker object.

Parameters

args - a java.lang.String[]

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


removeTreeModelListener

removeTreeModelListener( javax.swing.event.TreeModelListener l ) → void

Parameters

l - a TreeModelListener

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


valueForPathChanged

valueForPathChanged( javax.swing.tree.TreePath path, Object newvalue ) → void

Parameters

path - a TreePath
newvalue - an Object

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]