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 TypeMethodDescriptionvoid
Adds a listener for the TreeModelEvent posted after the tree changes.Returns the child of parent at index index in the parent's child array.int
getChildCount
(Object parent) Returns the number of children of parent.int
getIndexOfChild
(Object parent, Object child) Returns the index of child in parent.getRoot()
Returns the root of the tree.boolean
Returns true if node is a leaf.void
Removes a listener previously added with addTreeModelListener().void
valueForPathChanged
(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:
addTreeModelListener
in interfaceTreeModel
- Parameters:
l
-
-
removeTreeModelListener
Removes a listener previously added with addTreeModelListener().- Specified by:
removeTreeModelListener
in 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:
getChildCount
in interfaceTreeModel
- Parameters:
parent
-- Returns:
-
getIndexOfChild
Returns the index of child in parent.- Specified by:
getIndexOfChild
in 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:
valueForPathChanged
in interfaceTreeModel
- Parameters:
path
-newValue
-
-