Package io.guise.framework.model
Interface TreeModel
-
- All Superinterfaces:
ActionListenable
,ActionModel
,Model
,com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
- All Known Implementing Classes:
DefaultTreeModel
,TreeControl
public interface TreeModel extends ActionModel
A model for a tree of nodes.- Author:
- Garret Wilson
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROOT_NODE_PROPERTY
The bound property of the root node.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TreeNodeModel<?>
getRootNode()
void
setAllExpanded(boolean newAllExpanded)
Sets whether all tree nodes are expanded.void
setRootNode(TreeNodeModel<?> newRootNode)
Sets the root node of the tree model.-
Methods inherited from interface io.guise.framework.event.ActionListenable
addActionListener, removeActionListener
-
Methods inherited from interface io.guise.framework.model.ActionModel
getActionListeners, performAction, performAction
-
-
-
-
Method Detail
-
getRootNode
TreeNodeModel<?> getRootNode()
- Returns:
- The root node of the tree model.
-
setRootNode
void setRootNode(TreeNodeModel<?> newRootNode)
Sets the root node of the tree model. This is a bound property.- Parameters:
newRootNode
- The new root node of the tree model.- Throws:
java.lang.NullPointerException
- if the given root node isnull
.- See Also:
ROOT_NODE_PROPERTY
-
setAllExpanded
void setAllExpanded(boolean newAllExpanded)
Sets whether all tree nodes are expanded. This method delegates to the root nodeTreeNodeModel.setAllExpanded(boolean)
.- Parameters:
newAllExpanded
-true
if all the nodes should be expanded, orfalse
if they should be collapsed.
-
-