public final class WindowsTreeUI
extends com.sun.java.swing.plaf.windows.WindowsTreeUI
TreeUI.
Corrects the position of the tree button icon and provides two line styles:
angled dashed lines, or no lines at all. By default, lines are drawn.You can change the line style by setting a client property. The property key and values are a subset of the values used by the Metal L&F tree. To hide lines use one of the following:
JTree tree1 = new JTree();
tree1.putClientProperty("JTree.lineStyle", "None");
JTree tree2 = new JTree();
tree1.putClientProperty(Options.TREE_LINE_STYLE_KEY,
Options.TREE_LINE_STYLE_NONE_VALUE);
Although lines are shown by default, you could code:
JTree tree1 = new JTree();
tree1.putClientProperty("JTree.lineStyle", "Angled");
JTree tree2 = new JTree();
tree1.putClientProperty(Options.TREE_LINE_STYLE_KEY,
Options.TREE_LINE_STYLE_ANGLED_VALUE);
com.sun.java.swing.plaf.windows.WindowsTreeUI.CollapsedIcon, com.sun.java.swing.plaf.windows.WindowsTreeUI.ExpandedIcon, com.sun.java.swing.plaf.windows.WindowsTreeUI.WindowsTreeCellRendererBasicTreeUI.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.TreeTraverseActioncellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize| Constructor and Description |
|---|
WindowsTreeUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent b) |
protected void |
drawCentered(Component c,
Graphics graphics,
Icon icon,
int x,
int y) |
void |
installUI(JComponent c) |
protected void |
paintHorizontalLine(Graphics g,
JComponent c,
int y,
int left,
int right) |
protected void |
paintVerticalLine(Graphics g,
JComponent c,
int x,
int top,
int bottom) |
void |
uninstallUI(JComponent c) |
createDefaultCellRenderer, ensureRowsAreVisiblecancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawDashedHorizontalLine, drawDashedVerticalLine, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getDropLineRect, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installDefaults, installKeyboardActions, installListeners, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paint, paintDropLine, paintExpandControl, paintHorizontalPartOfLeg, paintRow, paintVerticalPartOfLeg, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, selectPathForEvent, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateRenderer, updateSizecontains, getAccessibleChild, getAccessibleChildrenCount, updatepublic static ComponentUI createUI(JComponent b)
public void installUI(JComponent c)
installUI in class BasicTreeUIpublic void uninstallUI(JComponent c)
uninstallUI in class BasicTreeUIprotected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
paintVerticalLine in class BasicTreeUIprotected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
paintHorizontalLine in class BasicTreeUIprotected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
drawCentered in class BasicTreeUICopyright © 2001-2014 JGoodies Software GmbH. All Rights Reserved.