Class HtmlTreeModel
java.lang.Object
org.htmlparser.parserapplications.filterbuilder.HtmlTreeModel
- All Implemented Interfaces:
TreeModel
Quick and dirty tree model for HTML nodes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener for the TreeModelEvent posted after the tree changes.Returns the child of parent at index index in the parent's child array.intgetChildCount(Object parent) Returns the number of children of parent.intgetIndexOfChild(Object parent, Object child) Returns the index of child in parent.getRoot()Returns the root of the tree.booleanReturns true if node is a leaf.voidRemoves a listener previously added with addTreeModelListener().voidvalueForPathChanged(TreePath path, Object newValue) Messaged when the user has altered the value for the item identified by path to newValue.
-
Field Details
-
mTreeListeners
The list of tree listeners. -
mRoot
The rootNode.
-
-
Constructor Details
-
HtmlTreeModel
Create an HTML tree view.
-
-
Method Details
-
addTreeModelListener
Adds a listener for the TreeModelEvent posted after the tree changes.- Specified by:
addTreeModelListenerin interfaceTreeModel- Parameters:
l-
-
removeTreeModelListener
Removes a listener previously added with addTreeModelListener().- Specified by:
removeTreeModelListenerin interfaceTreeModel- Parameters:
l-
-
getChild
Returns the child of parent at index index in the parent's child array. -
getChildCount
Returns the number of children of parent.- Specified by:
getChildCountin interfaceTreeModel- Parameters:
parent-- Returns:
-
getIndexOfChild
Returns the index of child in parent.- Specified by:
getIndexOfChildin interfaceTreeModel- Parameters:
parent-child-- Returns:
-
getRoot
Returns the root of the tree. -
isLeaf
Returns true if node is a leaf. -
valueForPathChanged
Messaged when the user has altered the value for the item identified by path to newValue.- Specified by:
valueForPathChangedin interfaceTreeModel- Parameters:
path-newValue-
-