public class DatabaseModel
extends java.lang.Object
implements javax.swing.tree.TreeModel
| Modifier and Type | Field and Description |
|---|---|
iSBatchPreferences |
preferences
The preferences.
|
| Constructor and Description |
|---|
DatabaseModel(Node root)
Instantiates a new database model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(Node parent,
Node child)
Adds the node.
|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds the tree model listener.
|
Node |
getChild(java.lang.Object parent,
int index)
Gets the child.
|
int |
getChildCount(java.lang.Object parent)
Gets the child count.
|
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Gets the index of child.
|
java.lang.Object[] |
getPathToRoot(Node aNode)
Gets the path to root.
|
Node |
getRoot()
Gets the root.
|
boolean |
isLeaf(java.lang.Object node)
Checks if is leaf.
|
void |
nodeChanged(javax.swing.tree.TreeNode lastPathComponent)
Node changed.
|
void |
removeNode(Node parent,
Node child)
Removes the node.
|
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes the tree model listener.
|
void |
setRoot(Node root)
Sets the root.
|
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
Value for path changed.
|
public iSBatchPreferences preferences
public DatabaseModel(Node root)
root - the rootpublic void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener in interface javax.swing.tree.TreeModell - the lpublic Node getChild(java.lang.Object parent, int index)
getChild in interface javax.swing.tree.TreeModelparent - the parentindex - the indexpublic int getChildCount(java.lang.Object parent)
getChildCount in interface javax.swing.tree.TreeModelparent - the parentpublic int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
getIndexOfChild in interface javax.swing.tree.TreeModelparent - the parentchild - the childpublic Node getRoot()
getRoot in interface javax.swing.tree.TreeModelpublic void setRoot(Node root)
root - the new rootpublic boolean isLeaf(java.lang.Object node)
isLeaf in interface javax.swing.tree.TreeModelnode - the nodepublic void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener in interface javax.swing.tree.TreeModell - the lpublic void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
valueForPathChanged in interface javax.swing.tree.TreeModelpath - the pathnewValue - the new valuepublic void addNode(Node parent, Node child)
parent - the parentchild - the childpublic void removeNode(Node parent, Node child)
parent - the parentchild - the childpublic java.lang.Object[] getPathToRoot(Node aNode)
aNode - the a nodepublic void nodeChanged(javax.swing.tree.TreeNode lastPathComponent)
lastPathComponent - the last path component