- 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
金属外观实现TreeUI。
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 toMetalTreeUI允许配置如何在视觉上呈现节点之间的间距和描绘。 支持以下提示: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.由于它一般是不切实际获得
TreeUI从JTree并浇铸成的实例MetalTreeUI启用通过客户端属性这个属性JTree.lineStyle。 例如,要切换到Horizontal样式,您可以执行以下操作:tree.putClientProperty("JTree.lineStyle", "Horizontal");默认值为
Angled。
-
-
嵌套类汇总
-
嵌套类/接口声明在类 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
-
-
字段汇总
-
声明的属性在类 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, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize
-
-
构造方法摘要
构造方法 构造器 描述 MetalTreeUI()构造MetalTreeUI。
-
方法摘要
所有方法 静态方法 实例方法 具体的方法 变量和类型 方法 描述 static ComponentUIcreateUI(JComponent x)构造MetalTreeUI。protected voiddecodeLineStyle(Object lineStyleFlag)在传递给客户端属性的字符串和内部表示(当前和int)之间进行转换protected booleanisLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)如果具有X坐标mouseX和Y坐标mouseY点处于扩展控制中,则返回true。protected voidpaintHorizontalSeparators(Graphics g, JComponent c)绘制水平分隔符。-
声明方法的类 javax.swing.plaf.basic.BasicTreeUI
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createDefaultCellRenderer, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, 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, paintDropLine, paintExpandControl, paintHorizontalLine, paintHorizontalPartOfLeg, paintRow, paintVerticalLine, 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, updateSize
-
声明方法的类 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, installUI, paint, uninstallUI, update
-
-
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent x)
构造MetalTreeUI。- 参数
-
x- 一个组件 - 结果
-
MetalTreeUI的实例
-
decodeLineStyle
protected void decodeLineStyle(Object lineStyleFlag)
在传递给客户端属性的字符串和内部表示(当前和int)之间进行转换- 参数
-
lineStyleFlag- 一面旗帜
-
isLocationInExpandControl
protected boolean isLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)如果具有X坐标mouseX和Y坐标mouseY点处于扩展控制中,则返回true。- 参数
-
row- 一排 -
rowLevel- 行级别 -
mouseX- X坐标 -
mouseY- Y坐标 - 结果
-
true如果具有X坐标mouseX和Y坐标mouseY点处于扩展控制中。
-
paintHorizontalSeparators
protected void paintHorizontalSeparators(Graphics g, JComponent c)
绘制水平分隔符。- 参数
-
g-实例Graphics -
c- 一个组件
-
-