public class MetalTreeUI extends BasicTreeUI
TreeUI
.
MetalTreeUI
allows for configuring how to
visually render the spacing and delineation between nodes. The following
hints are supported:
Angled |
A line is drawn connecting the child to the parent. For handling
of the root node refer to
JTree.setRootVisible(boolean) and
JTree.setShowsRootHandles(boolean) .
|
---|---|
Horizontal |
A horizontal line is drawn dividing the children of the root node. |
None |
Do not draw any visual indication between nodes. |
As it is typically impractical to obtain the TreeUI
from
the JTree
and cast to an instance of MetalTreeUI
you enable this property via the client property
JTree.lineStyle
. For example, to switch to
Horizontal
style you would do:
tree.putClientProperty("JTree.lineStyle", "Horizontal");
The default is Angled
.
BasicTreeUI.CellEditorHandler, BasicTreeUI.ComponentHandler, BasicTreeUI.FocusHandler, BasicTreeUI.KeyHandler, BasicTreeUI.MouseHandler, BasicTreeUI.MouseInputHandler, BasicTreeUI.NodeDimensionsHandler, BasicTreeUI.PropertyChangeHandler, BasicTreeUI.SelectionModelPropertyChangeHandler, BasicTreeUI.TreeCancelEditingAction, BasicTreeUI.TreeExpansionHandler, BasicTreeUI.TreeHomeAction, BasicTreeUI.TreeIncrementAction, BasicTreeUI.TreeModelHandler, BasicTreeUI.TreePageAction, BasicTreeUI.TreeSelectionHandler, BasicTreeUI.TreeToggleAction, BasicTreeUI.TreeTraverseAction
cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon,