public interface KTreeModel extends ModelProperties
COLUMN_NAMES_PROPERTY, COLUMN_TYPES_PROPERTY
Modifier and Type | Method and Description |
---|---|
void |
addChild(Object parent,
Object node)
Add a new child node to the given parent node.
|
void |
addChild(Object parent,
Object node,
int index)
Add a new child node to the given parent node.
|
void |
addTreeModelListener(KTreeModelListener listener)
Add a
KTreeModelListener to this model's list of listeners. |
Object |
getChild(Object parent,
int index)
Get a child of a node.
|
int |
getChildCount(Object parent)
Get a child count for a node.
|
Iterator |
getChildren(Object parent)
Get the children of a node.
|
Icon |
getIcon(Object node,
boolean isExpanded)
Get the icon for a node.
|
int |
getIndexOfChild(Object parent,
Object node)
Get the index of a child node in its parent's list of children.
|
String |
getLabel(Object node)
Get the label for a node.
|
Object |
getParent(Object node)
Get the parent of a node.
|
Object |
getRoot()
Get the root node.
|
Object |
getValueForProperty(Object node,
String property)
Get the value of an arbitrary property for a given node.
|
boolean |
isExpandable(Object node)
Determine if a node is expandable.
|
void |
preloadChildren(Object parent)
Preload the children of a given node.
|
void |
releaseChildren(Object parent)
Release the children of a given parent node.
|
void |
removeChild(Object parent,
int index)
Remove a child node of a given parent node.
|
void |
removeChildren(Object parent)
Remove all of the children of a given parent node.
|
void |
removeTreeModelListener(KTreeModelListener listener)
Remove a
KTreeModelListener from this model's list of
listeners. |
void |
setRoot(Object root)
Set the root node.
|
void |
updateChildren(Object parent)
Indicate to listeners that the list of children of the specified node
has changed.
|
void |
updateNode(Object node)
Indicate to listeners that the specified node has changed.
|
void setRoot(Object root)
root
- The new root node.int getChildCount(Object parent)
parent
- The parent node.Object getChild(Object parent, int index)
parent
- The parent node.index
- The index of the child within the parent's list of children.null
if no such node exists.Iterator getChildren(Object parent)
parent
- The parent node.int getIndexOfChild(Object parent, Object node)
parent
- The parent node.node
- The child node.void removeChildren(Object parent)
parent
- The parent node.void removeChild(Object parent, int index)
parent
- The parent node.index
- The index of the child to remove within the parent's list of
children.void addChild(Object parent, Object node)
parent
- The parent node.node
- The new child node.void addChild(Object parent, Object node, int index)
parent
- The parent node.node
- The new child node.index
- The offset in the list of children at which the new node
should be inserted.Object getParent(Object node)
node
- The child node.
return The parent of the specified child node.boolean isExpandable(Object node)
node
- The node to test.true
if the node is expandable, false
otherwise.Icon getIcon(Object node, boolean isExpanded)
node
- The node.isExpanded
- The current expanded state for the node.String getLabel(Object node)
node
- The node.void updateNode(Object node)
node
- The node.void updateChildren(Object parent)
parent
- The parent node.void preloadChildren(Object parent)
parent
- The node for which children should be preloaded.void releaseChildren(Object parent)
parent
- The root node of the subtree that should be released.Object getValueForProperty(Object node, String property)
node
- The node.property
- The name of the property.null
if
there is no value for this property.void addTreeModelListener(KTreeModelListener listener)
KTreeModelListener
to this model's list of listeners.listener
- The listener to add.void removeTreeModelListener(KTreeModelListener listener)
KTreeModelListener
from this model's list of
listeners.listener
- The listener to remove.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses