- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TreeUI
-
- javax.swing.plaf.basic.BasicTreeUI
-
- javax.swing.plaf.metal.MetalTreeUI
-
public class MetalTreeUI extends BasicTreeUI
The metal look and feel implementation ofTreeUI
.MetalTreeUI
allows for configuring how to visually render the spacing and delineation between nodes. The following hints are supported:Descriptions of supported hints: Angled, Horizontal, and None Hint Description Angled A line is drawn connecting the child to the parent. For handling of the root node refer to JTree.setRootVisible(boolean)
andJTree.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 theJTree
and cast to an instance ofMetalTreeUI
you enable this property via the client propertyJTree.lineStyle
. For example, to switch toHorizontal
style you would do:tree.putClientProperty("JTree.lineStyle", "Horizontal");
The default is
Angled
.
-
-
Nested Class Summary
-
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicTreeUI
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
-
-
Field Summary
-
Fields declared in class javax.swing.plaf.basic.BasicTreeUI
cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent,
-
-