|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultTreeModel com.alee.laf.tree.WebTreeModel<E>
public class WebTreeModel<E extends javax.swing.tree.DefaultMutableTreeNode>
Extended Swing DefaultTreeModel. This model contains multiply elements add/remove methods and works with typed elements.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultTreeModel |
---|
asksAllowsChildren, listenerList, root |
Constructor Summary | |
---|---|
WebTreeModel(E root)
Constructs tree model with a specified node as root. |
|
WebTreeModel(E root,
boolean asksAllowsChildren)
Constructs tree model with a specified node as root. |
Method Summary | |
---|---|
E |
getRootNode()
Returns root node. |
void |
insertNodesInto(E[] children,
E parent,
int index)
Inserts a list of child nodes into parent node. |
void |
insertNodesInto(java.util.List<E> children,
E parent,
int index)
Inserts a list of child nodes into parent node. |
void |
removeNodesFromParent(E node)
Removes all child nodes under the specified node from tree structure. |
void |
removeNodesFromParent(E[] nodes)
Removes specified nodes from tree structure. |
void |
removeNodesFromParent(java.util.List<E> nodes)
Removes specified nodes from tree structure. |
void |
updateNode(E node)
Forces tree node to be updated. |
void |
updateNodeStructure(E node)
Forces tree node to be updated. |
void |
updateTree()
Forces update of all visible node sizes and view. |
Methods inherited from class javax.swing.tree.DefaultTreeModel |
---|
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebTreeModel(E root)
root
- TreeNode object that is the root of the treepublic WebTreeModel(E root, boolean asksAllowsChildren)
root
- TreeNode object that is the root of the treeasksAllowsChildren
- false if any node can have children, true if each node is asked to see if it can have childrenMethod Detail |
---|
public E getRootNode()
public void insertNodesInto(java.util.List<E> children, E parent, int index)
children
- list of new child nodesparent
- parent nodeindex
- insert indexpublic void insertNodesInto(E[] children, E parent, int index)
children
- array of new child nodesparent
- parent nodeindex
- insert indexpublic void removeNodesFromParent(java.util.List<E> nodes)
nodes
- nodes to removepublic void removeNodesFromParent(E node)
node
- node to remove childs frompublic void removeNodesFromParent(E[] nodes)
nodes
- nodes to removepublic void updateNode(E node)
node
- tree node to be updatedpublic void updateNodeStructure(E node)
node
- tree node to be updatedpublic void updateTree()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |