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 {@link javax.swing.JTree#setRootVisible} and{@link javax.swing.JTree#setShowsRootHandles}. |
---|---|
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
.
@author Tom Santos
@author Steve Wilson (value add stuff)
|
|