Uses of Class
javax.swing.tree.TreePath
-
Packages that use TreePath 软件包 描述 javax.swing 提供一组“轻量级”(全Java语言)组件,这些组件在所有平台上尽可能地工作。javax.swing.event 提供由Swing组件触发的事件。javax.swing.plaf 提供一个接口和许多抽象类,Swing使用它们来提供其可插入的外观功能。javax.swing.plaf.basic 提供根据Basic外观构建的用户界面对象。javax.swing.plaf.multi 提供组合两种或多种外观的用户界面对象。javax.swing.tree 提供用于处理javax.swing.JTree
类和接口。 -
-
Uses of TreePath in javax.swing
Methods in javax.swing that return TreePath 变量和类型 方法 描述 TreePath
JTree. getAnchorSelectionPath()
返回标识为锚点的路径。TreePath
JTree. getClosestPathForLocation(int x, int y)
返回最接近x,y的节点的路径。TreePath
JTree. getEditingPath()
返回当前正在编辑的元素的路径。TreePath
JTree. getLeadSelectionPath()
返回标识为潜在客户的路径。TreePath
JTree. getNextMatch(String prefix, int startingRow, Position.Bias bias)
将TreePath返回到以前缀开头的下一个树元素。TreePath
JTree.DropLocation. getPath()
返回应在树中放置已删除数据的路径。protected TreePath[]
JTree. getPathBetweenRows(int index0, int index1)
返回指定行之间的路径(包括)。TreePath
JTree. getPathForLocation(int x, int y)
返回指定位置的节点的路径。TreePath
JTree. getPathForRow(int row)
返回指定行的路径。TreePath
JTree. getSelectionPath()
返回第一个选定节点的路径。TreePath[]
JTree. getSelectionPaths()
返回所有选定值的路径。Methods in javax.swing that return types with arguments of type TreePath 变量和类型 方法 描述 protected Enumeration<TreePath>
JTree. getDescendantToggledPaths(TreePath parent)
返回Enumeration
的TreePaths
已展开是后裔parent
。Enumeration<TreePath>
JTree. getExpandedDescendants(TreePath parent)
返回一个Enumeration
路径的后裔parent
当前展开。Methods in javax.swing with parameters of type TreePath 变量和类型 方法 描述 void
JTree. addSelectionPath(TreePath path)
将指定的TreePath
标识的节点添加到当前选择中。void
JTree. addSelectionPaths(TreePath[] paths)
将路径数组中的每个路径添加到当前选择。void
JTree.EmptySelectionModel. addSelectionPaths(TreePath[] paths)
这是重写,什么都不做;EmptySelectionModel
不允许选择。void
JTree. collapsePath(TreePath path)
确保指定路径标识的节点已折叠并可查看。void
JTree. expandPath(TreePath path)
确保指定路径标识的节点已展开并可查看。void
JTree. fireTreeCollapsed(TreePath path)
通知所有已注册对此事件类型的通知感兴趣的听众。void
JTree. fireTreeExpanded(TreePath path)
通知所有已注册对此事件类型的通知感兴趣的听众。void
JTree. fireTreeWillCollapse(TreePath path)
通知所有已注册对此事件类型的通知感兴趣的听众。void
JTree. fireTreeWillExpand(TreePath path)
通知所有已注册对此事件类型的通知感兴趣的听众。protected Enumeration<TreePath>
JTree. getDescendantToggledPaths(TreePath parent)
返回Enumeration
的TreePaths
,其已被扩展为parent
后代。Enumeration<TreePath>
JTree. getExpandedDescendants(TreePath parent)
返回一个Enumeration
路径的后裔parent
当前展开。Rectangle
JTree. getPathBounds(TreePath path)
返回将绘制指定节点的Rectangle
。int
JTree. getRowForPath(TreePath path)
返回显示指定路径标识的节点的行。boolean
JTree. hasBeenExpanded(TreePath path)
如果路径标识的节点曾被扩展,则返回true。boolean
JTree. isCollapsed(TreePath path)
如果path标识的值当前已折叠,则返回true,如果当前未显示path中的任何值,则返回false。boolean
JTree. isExpanded(TreePath path)
如果路径标识的节点当前已展开,则返回true,boolean
JTree. isPathEditable(TreePath path)
返回isEditable
。boolean
JTree. isPathSelected(TreePath path)
如果当前选择了路径标识的项,则返回true。boolean
JTree. isVisible(TreePath path)
如果path标识的值当前是可见的,则返回true,这意味着它是根或其所有父项都已展开。void
JTree. makeVisible(TreePath path)
确保路径标识的节点当前可见。protected boolean
JTree. removeDescendantSelectedPaths(TreePath path, boolean includePath)
删除选择中作为path
后代的所有路径。void
JTree. removeSelectionPath(TreePath path)
从当前选择中删除指定路径标识的节点。void
JTree.EmptySelectionModel. removeSelectionPaths(TreePath[] paths)
这是重写,什么都不做;EmptySelectionModel
不允许选择。void
JTree. removeSelectionPaths(TreePath[] paths)
从当前选择中删除指定路径标识的节点。void
JTree. scrollPathToVisible(TreePath path)
确保路径中的所有路径组件都已展开(最后一个路径组件除外)并滚动,以便显示由路径标识的节点。void
JTree. setAnchorSelectionPath(TreePath newPath)
设置标识为锚点的路径。protected void
JTree. setExpandedState(TreePath path, boolean state)
设置此JTree
的展开状态。void
JTree. setLeadSelectionPath(TreePath newPath)
将路径标识设置为潜在客户。void
JTree. setSelectionPath(TreePath path)
选择由指定路径标识的节点。void
JTree.EmptySelectionModel. setSelectionPaths(TreePath[] paths)
这是重写,什么都不做;EmptySelectionModel
不允许选择。void
JTree. setSelectionPaths(TreePath[] paths)
选择由指定路径数组标识的节点。void
JTree. startEditingAtPath(TreePath path)
选择由指定路径标识的节点并启动编辑。Method parameters in javax.swing with type arguments of type TreePath 变量和类型 方法 描述 protected void
JTree. removeDescendantToggledPaths(Enumeration<TreePath> toRemove)
删除已扩展的TreePaths
中toRemove
所有后代。Constructors in javax.swing with parameters of type TreePath 构造器 描述 AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)
构造一个AccessibleJTreeNode -
Uses of TreePath in javax.swing.event
Fields in javax.swing.event declared as TreePath 变量和类型 字段 描述 protected TreePath
TreeSelectionEvent. newLeadSelectionPath
路径更改后的leadSelectionPath可能为null。protected TreePath
TreeSelectionEvent. oldLeadSelectionPath
路径更改前的leadSelectionPath可能为null。protected TreePath
TreeExpansionEvent. path
此事件表示的值的路径。protected TreePath
TreeModelEvent. path
已更改的节点的父节点的路径。protected TreePath[]
TreeSelectionEvent. paths
此事件表示的路径。Methods in javax.swing.event that return TreePath 变量和类型 方法 描述 TreePath
TreeSelectionEvent. getNewLeadSelectionPath()
返回当前的潜在客户路径。TreePath
TreeSelectionEvent. getOldLeadSelectionPath()
返回先前为前导路径的路径。TreePath
TreeExpansionEvent. getPath()
返回已展开/折叠的值的路径。TreePath
TreeSelectionEvent. getPath()
返回第一个路径元素。TreePath[]
TreeSelectionEvent. getPaths()
返回已从选择中添加或删除的路径。TreePath
TreeModelEvent. getTreePath()
对于除treeStructureChanged之外的所有事件,返回已更改节点的父节点。Methods in javax.swing.event with parameters of type TreePath 变量和类型 方法 描述 boolean
TreeSelectionEvent. isAddedPath(TreePath path)
返回指定的路径是否已添加到选择中。Constructors in javax.swing.event with parameters of type TreePath 构造器 描述 TreeExpansionEvent(Object source, TreePath path)
构造一个TreeExpansionEvent对象。TreeModelEvent(Object source, TreePath path)
用于在节点结构以某种方式更改时创建事件,将修改后的子树的根路径标识为TreePath对象。TreeModelEvent(Object source, TreePath path, int[] childIndices, Object[] children)
用于在更改,插入或删除节点时创建事件,将已修改项的父级路径标识为TreePath对象。TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
表示选择TreeSelectionModel
。TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
表示选择TreeSelectionModel
。 -
Uses of TreePath in javax.swing.plaf
Methods in javax.swing.plaf that return TreePath 变量和类型 方法 描述 abstract TreePath
TreeUI. getClosestPathForLocation(JTree tree, int x, int y)
返回最接近x,y的节点的路径。abstract TreePath
TreeUI. getEditingPath(JTree tree)
返回正在编辑的元素的路径。abstract TreePath
TreeUI. getPathForRow(JTree tree, int row)
返回传入行的路径。Methods in javax.swing.plaf with parameters of type TreePath 变量和类型 方法 描述 abstract Rectangle
TreeUI. getPathBounds(JTree tree, TreePath path)
返回包含将绘制路径中最后一项的标签部分的Rectangle。abstract int
TreeUI. getRowForPath(JTree tree, TreePath path)
返回路径中标识的最后一项可见的行。abstract void
TreeUI. startEditingAtPath(JTree tree, TreePath path)
选择路径中的最后一项并尝试编辑它。 -
Uses of TreePath in javax.swing.plaf.basic
Fields in javax.swing.plaf.basic declared as TreePath 变量和类型 字段 描述 protected TreePath
BasicTreeUI. editingPath
正在编辑的路径。Fields in javax.swing.plaf.basic with type parameters of type TreePath 变量和类型 字段 描述 protected Hashtable<TreePath,Boolean>
BasicTreeUI. drawingCache
用于最小化垂直线的绘制。Methods in javax.swing.plaf.basic that return TreePath 变量和类型 方法 描述 TreePath
BasicTreeUI. getClosestPathForLocation(JTree tree, int x, int y)
返回最接近x,y的节点的路径。TreePath
BasicTreeUI. getEditingPath(JTree tree)
返回正在编辑的元素的路径。protected TreePath
BasicTreeUI. getLastChildPath(TreePath parent)
返回最后一个子项parent
的路径。TreePath
BasicTreeUI. getPathForRow(JTree tree, int row)
返回传入行的路径。Methods in javax.swing.plaf.basic with parameters of type TreePath 变量和类型 方法 描述 protected void
BasicTreeUI. checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)
如果mouseX
和mouseY
都在的展开/折叠区域row
,这将切换行。protected TreePath
BasicTreeUI. getLastChildPath(TreePath parent)
返回最后一个子项parent
的路径。Rectangle
BasicTreeUI. getPathBounds(JTree tree, TreePath path)
返回包含将绘制路径中最后一项的标签部分的Rectangle。int
BasicTreeUI. getRowForPath(JTree tree, TreePath path)
返回路径中标识的最后一项可见的行。protected void
BasicTreeUI. handleExpandControlClick(TreePath path, int mouseX, int mouseY)
当用户单击特定行时发送消息,这将调用toggleExpandState
。protected boolean
BasicTreeUI. isLocationInExpandControl(TreePath path, int mouseX, int mouseY)
返回true
如果mouseX
和mouseY
下降,用于展开/折叠节点和节点的行的区域row
不代表叶子。protected void
BasicTreeUI. paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
绘制一行的展开(切换)部分。protected void
BasicTreeUI. paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
涂抹腿部的水平部分。protected void
BasicTreeUI. paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
绘制一行的渲染器部分。protected void
BasicTreeUI. paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
涂抹腿部的垂直部分。protected void
BasicTreeUI. pathWasCollapsed(TreePath path)
它崩溃后从VisibleTreeNode
消息。protected void
BasicTreeUI. pathWasExpanded(TreePath path)
在VisibleTreeNode
之后从VisibleTreeNode
传递消息。protected void
BasicTreeUI. selectPathForEvent(TreePath path, MouseEvent event)
消息传递以在特定行上基于MouseEvent
更新选择。protected boolean
BasicTreeUI. shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
如果应为指定行绘制展开(切换)控件,则返回true
。protected boolean
BasicTreeUI. startEditing(TreePath path, MouseEvent event)
如果有cellEditor
且shouldSelectCell
返回true
将开始编辑节点。void
BasicTreeUI. startEditingAtPath(JTree tree, TreePath path)
选择路径中的最后一项并尝试编辑它。protected void
BasicTreeUI. toggleExpandState(TreePath path)
如果未展开,则展开路径;如果展开,则展开行。protected void
BasicTreeUI. updateExpandedDescendants(TreePath path)
通过从树中获取扩展后代并转发到树状态来更新path
的所有后代的扩展状态。 -
Uses of TreePath in javax.swing.plaf.multi
Methods in javax.swing.plaf.multi that return TreePath 变量和类型 方法 描述 TreePath
MultiTreeUI. getClosestPathForLocation(JTree a, int b, int c)
在由此对象处理的每个UI上调用getClosestPathForLocation
方法。TreePath
MultiTreeUI. getEditingPath(JTree a)
在由此对象处理的每个UI上调用getEditingPath
方法。TreePath
MultiTreeUI. getPathForRow(JTree a, int b)
在由此对象处理的每个UI上调用getPathForRow
方法。Methods in javax.swing.plaf.multi with parameters of type TreePath 变量和类型 方法 描述 Rectangle
MultiTreeUI. getPathBounds(JTree a, TreePath b)
在由此对象处理的每个UI上调用getPathBounds
方法。int
MultiTreeUI. getRowForPath(JTree a, TreePath b)
在由此对象处理的每个UI上调用getRowForPath
方法。void
MultiTreeUI. startEditingAtPath(JTree a, TreePath b)
在由此对象处理的每个UI上调用startEditingAtPath
方法。 -
Uses of TreePath in javax.swing.tree
Fields in javax.swing.tree declared as TreePath 变量和类型 字段 描述 protected TreePath
DefaultTreeCellEditor. lastPath
选择的最后一条路径。protected TreePath
DefaultTreeSelectionModel. leadPath
添加的最后一条路径。protected TreePath[]
DefaultTreeSelectionModel. selection
当前选定的路径。Methods in javax.swing.tree that return TreePath 变量和类型 方法 描述 TreePath
DefaultTreeSelectionModel. getLeadSelectionPath()
返回添加的最后一个路径。TreePath
TreeSelectionModel. getLeadSelectionPath()
返回添加的最后一个路径。TreePath
TreePath. getParentPath()
返回父级的TreePath
。abstract TreePath
AbstractLayoutCache. getPathClosestTo(int x, int y)
返回最接近x,y的节点的路径。TreePath
FixedHeightLayoutCache. getPathClosestTo(int x, int y)
返回最接近x,y的节点的路径。TreePath
VariableHeightLayoutCache. getPathClosestTo(int x, int y)
返回最接近x,y的节点的路径。abstract TreePath
AbstractLayoutCache. getPathForRow(int row)
返回传入行的路径。TreePath
FixedHeightLayoutCache. getPathForRow(int row)
返回传入行的路径。TreePath
VariableHeightLayoutCache. getPathForRow(int row)
返回row
的路径。TreePath
DefaultTreeSelectionModel. getSelectionPath()
返回选择中的第一个路径。TreePath
TreeSelectionModel. getSelectionPath()
返回选择中的第一个路径。TreePath[]
DefaultTreeSelectionModel. getSelectionPaths()
返回选择。TreePath[]
TreeSelectionModel. getSelectionPaths()
返回选择中的路径。TreePath
TreePath. pathByAddingChild(Object child)
返回包含此路径的所有元素的新路径以及child
。Methods in javax.swing.tree that return types with arguments of type TreePath 变量和类型 方法 描述 abstract Enumeration<TreePath>
AbstractLayoutCache. getVisiblePathsFrom(TreePath path)
返回一个Enumerator
,它在从传入位置开始的可见路径上递增。Enumeration<TreePath>
FixedHeightLayoutCache. getVisiblePathsFrom(TreePath path)
返回一个枚举器,该枚举器在从传入位置开始的可见路径上递增。Enumeration<TreePath>
VariableHeightLayoutCache. getVisiblePathsFrom(TreePath path)
返回一个Enumerator
,它在从传入位置开始的可见路径上递增。Methods in javax.swing.tree with parameters of type TreePath 变量和类型 方法 描述 void
DefaultTreeSelectionModel. addSelectionPath(TreePath path)
添加当前选择的路径。void
TreeSelectionModel. addSelectionPath(TreePath path)
添加当前选择的路径。void
DefaultTreeSelectionModel. addSelectionPaths(TreePath[] paths)
添加当前选择的路径。void
TreeSelectionModel. addSelectionPaths(TreePath[] paths)
添加当前选择的路径。protected boolean
DefaultTreeSelectionModel. arePathsContiguous(TreePath[] paths)
如果路径是连续的,或者此对象没有RowMapper,则返回true。protected boolean
DefaultTreeSelectionModel. canPathsBeAdded(TreePath[] paths)
用于测试是否可以添加一组特定的TreePath
。protected boolean
DefaultTreeSelectionModel. canPathsBeRemoved(TreePath[] paths)
如果可以在不破坏模型连续性的情况下删除路径,则返回true。abstract Rectangle
AbstractLayoutCache. getBounds(TreePath path, Rectangle placeIn)
返回一个矩形,给出绘制路径所需的边界。Rectangle
FixedHeightLayoutCache. getBounds(TreePath path, Rectangle placeIn)
返回一个矩形,给出绘制路径所需的边界。Rectangle
VariableHeightLayoutCache. getBounds(TreePath path, Rectangle placeIn)
返回Rectangle
它包围在其中所确定的项目的标签部path
将被绘制。abstract boolean
AbstractLayoutCache. getExpandedState(TreePath path)
如果路径已展开且可见,则返回true。boolean
FixedHeightLayoutCache. getExpandedState(TreePath path)
如果路径已展开且可见,则返回true。boolean
VariableHeightLayoutCache. getExpandedState(TreePath path)
如果路径已展开且可见,则返回true。abstract int
AbstractLayoutCache. getRowForPath(TreePath path)
返回路径中标识的最后一项可见的行。int
FixedHeightLayoutCache. getRowForPath(TreePath path)
返回路径中标识的最后一项可见的行。int
VariableHeightLayoutCache. getRowForPath(TreePath path)
返回路径中标识的最后一项可见的行。int[]
AbstractLayoutCache. getRowsForPaths(TreePath[] paths)
返回显示path
中的TreePath
实例的行。int[]
RowMapper. getRowsForPaths(TreePath[] path)
返回显示path
中的TreePath实例的行。abstract int
AbstractLayoutCache. getVisibleChildCount(TreePath path)
返回行的可见子项数。int
FixedHeightLayoutCache. getVisibleChildCount(TreePath path)
返回行的可见子项数。int
VariableHeightLayoutCache. getVisibleChildCount(TreePath path)
返回path
的可见子path
。abstract Enumeration<TreePath>
AbstractLayoutCache. getVisiblePathsFrom(TreePath path)
返回一个Enumerator
,它在传入位置开始的可见路径上递增。Enumeration<TreePath>
FixedHeightLayoutCache. getVisiblePathsFrom(TreePath path)
返回一个枚举器,该枚举器在从传入位置开始的可见路径上递增。Enumeration<TreePath>
VariableHeightLayoutCache. getVisiblePathsFrom(TreePath path)
返回一个Enumerator
,它在传入位置开始的可见路径上递增。abstract void
AbstractLayoutCache. invalidatePathBounds(TreePath path)
指示LayoutCache
,对于边界path
无效,并且需要进行更新。void
FixedHeightLayoutCache. invalidatePathBounds(TreePath path)
什么都不做,FixedHeightLayoutCache没有缓存宽度,这就是所有可能改变的。void
VariableHeightLayoutCache. invalidatePathBounds(TreePath path)
指示LayoutCache
,对于边界path
无效,并且需要进行更新。boolean
TreePath. isDescendant(TreePath aTreePath)
如果aTreePath
是此TreePath
的后代,则返回true。abstract boolean
AbstractLayoutCache. isExpanded(TreePath path)
如果当前展开的行标识的值,则返回true。boolean
FixedHeightLayoutCache. isExpanded(TreePath path)
如果当前展开的行标识的值,则返回true。boolean
VariableHeightLayoutCache. isExpanded(TreePath path)
如果当前扩展了由path
标识的值,则返回true。boolean
DefaultTreeSelectionModel. isPathSelected(TreePath path)
如果路径path
在当前选择中,则返回true。boolean
TreeSelectionModel. isPathSelected(TreePath path)
如果路径path
在当前选择中,则返回true。protected void
DefaultTreeSelectionModel. notifyPathChange(Vector<?> changedPaths, TreePath oldLeadSelection)
已过时。截至JDK 1.7版void
DefaultTreeSelectionModel. removeSelectionPath(TreePath path)
从选择中删除路径。void
TreeSelectionModel. removeSelectionPath(TreePath path)
从选择中删除路径。void
DefaultTreeSelectionModel. removeSelectionPaths(TreePath[] paths)
从选择中删除路径。void
TreeSelectionModel. removeSelectionPaths(TreePath[] paths)
从选择中删除路径。abstract void
AbstractLayoutCache. setExpandedState(TreePath path, boolean isExpanded)
标记路径path
展开状态为isExpanded
。void
FixedHeightLayoutCache. setExpandedState(TreePath path, boolean isExpanded)
标记路径path
展开状态为isExpanded
。void
VariableHeightLayoutCache. setExpandedState(TreePath path, boolean isExpanded)
标记路径path
展开状态为isExpanded
。void
DefaultTreeSelectionModel. setSelectionPath(TreePath path)
将选择设置为路径。void
TreeSelectionModel. setSelectionPath(TreePath path)
将选择设置为路径。void
DefaultTreeSelectionModel. setSelectionPaths(TreePath[] pPaths)
设置选择。void
TreeSelectionModel. setSelectionPaths(TreePath[] paths)
将选择设置为路径。void
DefaultTreeModel. valueForPathChanged(TreePath path, Object newValue)
这将设置由路径标识的TreeNode的用户对象,并发布更改的节点。void
TreeModel. valueForPathChanged(TreePath path, Object newValue)
当用户将newValue
标识的项目的值更改为path
发送newValue
。Constructors in javax.swing.tree with parameters of type TreePath 构造器 描述 TreePath(TreePath parent, Object lastPathComponent)
使用指定的父元素和元素创建TreePath
。
-