Package gov.nasa.worldwind.util.tree
Interface Tree
-
- All Superinterfaces:
AVList,java.util.EventListener,MessageListener,OrderedRenderable,java.beans.PropertyChangeListener,Renderable,WWObject
public interface Tree extends WWObject, OrderedRenderable
A tree of objects, drawn in the WorldWindow, that the user can interact with. How the tree is drawn is determined by theTreeLayout.- See Also:
TreeModel,TreeLayout
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcollapsePath(TreePath path)Collapse a path in the tree.voidexpandPath(TreePath path)Expand a path in the tree.TreeLayoutgetLayout()Get the tree layout.TreeModelgetModel()Get the tree model.TreeNodegetNode(TreePath path)Locate a node in the tree.booleanisNodeExpanded(TreeNode node)Is a node expanded?booleanisPathExpanded(TreePath path)Is a path expanded in the tree?voidmakeVisible(TreePath path)Make a node in the tree visible in the rendered tree.voidsetLayout(TreeLayout layout)Set the tree layout.voidsetModel(TreeModel model)Set the tree model.voidtogglePath(TreePath path)Expand a collapsed path, or collapse an expanded path.-
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
Methods inherited from interface gov.nasa.worldwind.render.OrderedRenderable
getDistanceFromEye, pick
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
-
-
-
Method Detail
-
setLayout
void setLayout(TreeLayout layout)
Set the tree layout. The layout determines how the tree will be rendered.- Parameters:
layout- New layout.- See Also:
getLayout()
-
getLayout
TreeLayout getLayout()
Get the tree layout. The layout determines how the tree will be rendered.- Returns:
- The tree layout.
- See Also:
setLayout(TreeLayout)
-
setModel
void setModel(TreeModel model)
Set the tree model. The model determines the contents of the tree.- Parameters:
model- New tree model.- See Also:
getModel()
-
getModel
TreeModel getModel()
Get the tree model. The model determines the contents of the tree.- Returns:
- the tree model.
- See Also:
setModel(TreeModel)
-
getNode
TreeNode getNode(TreePath path)
Locate a node in the tree.- Parameters:
path- Path to the node.- Returns:
- Node identified by
pathif it exists in the tree.
-
makeVisible
void makeVisible(TreePath path)
Make a node in the tree visible in the rendered tree. For example, scroll the tree viewport so that a path is visible.- Parameters:
path- Path to make visible.
-
expandPath
void expandPath(TreePath path)
Expand a path in the tree. Has no effect on leaf nodes.- Parameters:
path- Path to expand.
-
collapsePath
void collapsePath(TreePath path)
Collapse a path in the tree. Has no effect on leaf nodes.- Parameters:
path- Path to collapse.
-
togglePath
void togglePath(TreePath path)
Expand a collapsed path, or collapse an expanded path. Has no effect on leaf nodes.- Parameters:
path- Path to operate on. If the node defined bypathis expanded, it will be collapsed. If it is collapsed it will be expanded.
-
isPathExpanded
boolean isPathExpanded(TreePath path)
Is a path expanded in the tree?- Parameters:
path- Path to test.- Returns:
- true if the path is expanded, false if collapsed. Always returns false for leaf nodes.
-
isNodeExpanded
boolean isNodeExpanded(TreeNode node)
Is a node expanded?- Parameters:
node- Node to test.- Returns:
- true if the node is expanded, false if collapsed. Always returns false for leaf nodes.
-
-