|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
V - The type of value contained in the tree node.public interface TreeNodeModel<V>
A node in a tree model.
Property change events and action events on one tree node will be bubbled up the hierarchy, with the tree node initiating the event accessible via TargetedEvent.getTarget().
| Field Summary | |
|---|---|
static java.lang.String |
EXPANDED_PROPERTY
The expanded bound property. |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.model.Selectable |
|---|
SELECTED_PROPERTY |
| Method Summary | |
|---|---|
void |
add(TreeNodeModel<?> treeNode)
Adds a child tree node to this tree node. |
void |
clear()
Removes all of the child tree nodes from this tree node. |
int |
getDepth()
Returns the zero-based depth of the node within in its tree. |
TreeNodeModel<?> |
getParent()
|
boolean |
hasChild(TreeNodeModel<?> treeNode)
Determines whether this tree node contains the given child tree node. |
boolean |
hasChildren()
|
boolean |
isExpanded()
|
boolean |
isLeaf()
Determines whether this node could be considered a leaf node. |
void |
remove(TreeNodeModel<?> treeNode)
Removes a child tree node from this tree node. |
void |
setAllExpanded(boolean newAllExpanded)
Sets whether all tree nodes, including this node, are expanded in this subtree. |
void |
setExpanded(boolean newExpanded)
Sets whether the node is expanded, showing its children, if any. |
void |
setParent(TreeNodeModel<?> newParent)
Sets the parent of this tree node. |
| Methods inherited from interface com.guiseframework.model.ActionModel |
|---|
getActionListeners, performAction, performAction |
| Methods inherited from interface com.guiseframework.event.ActionListenable |
|---|
addActionListener, removeActionListener |
| Methods inherited from interface com.guiseframework.model.ValueModel |
|---|
clearValue, getDefaultValue, getValidator, getValue, getValueClass, isValidValue, resetValue, setValidator, setValue, validateValue |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from interface com.guiseframework.model.Selectable |
|---|
isSelected, setSelected |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Field Detail |
|---|
static final java.lang.String EXPANDED_PROPERTY
| Method Detail |
|---|
boolean isExpanded()
void setExpanded(boolean newExpanded)
Boolean.
newExpanded - true if the node is expanded.EXPANDED_PROPERTYvoid setAllExpanded(boolean newAllExpanded)
newAllExpanded - true if all the nodes in this tree should be expanded, or false if they should be collapsed.setExpanded(boolean)boolean isLeaf()
false even if it currently has no children, if it intends to load them later and there is no way to know ahead of time if there will be children.
true if this is a leaf node, else false if this node should not be considered a leaf.boolean hasChildren()
boolean hasChild(TreeNodeModel<?> treeNode)
treeNode - The tree node to check.
true if this tree node contains the given tree node.void add(TreeNodeModel<?> treeNode)
treeNode - The tree node to add.
java.lang.IllegalArgumentException - if the tree node already has a parent.void remove(TreeNodeModel<?> treeNode)
treeNode - The child tree node to remove.
java.lang.IllegalArgumentException - if the tree node is not a child of this tree node.void clear()
TreeNodeModel<?> getParent()
null if this node has no parent.void setParent(TreeNodeModel<?> newParent)
newParent - The new parent for this tree node, or null if this tree node is being removed from a parent.
java.lang.IllegalStateException - if a parent is provided and this tree node already has a parent.
java.lang.IllegalStateException - if no parent is provided and this tree node's old parent still recognizes this tree node as its child.
java.lang.IllegalArgumentException - if a parent is provided and the given parent does not already recognize this tree node as its child.add(TreeNodeModel),
remove(TreeNodeModel)int getDepth()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||