Uses of Class
javax.swing.tree.TreePath
-
Packages that use TreePath Package Description javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.javax.swing.event Provides for events fired by Swing components.javax.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.javax.swing.plaf.basic Provides user interface objects built according to the Basic look and feel.javax.swing.plaf.multi Provides user interface objects that combine two or more look and feels.javax.swing.tree Provides classes and interfaces for dealing withjavax.swing.JTree. -
-
Uses of TreePath in javax.swing
Methods in javax.swing that return TreePath Modifier and Type Method Description TreePathJTree. getAnchorSelectionPath()Returns the path identified as the anchor.TreePathJTree. getClosestPathForLocation(int x, int y)Returns the path to the node that is closest to x,y.TreePathJTree. getEditingPath()Returns the path to the element that is currently being edited.TreePathJTree. getLeadSelectionPath()Returns the path identified as the lead.TreePathJTree. getNextMatch(String prefix, int startingRow, Position.Bias bias)Returns the TreePath to the next tree element that begins with a prefix.TreePathJTree.DropLocation. getPath()Returns the path where dropped data should be placed in the tree.protected TreePath[]JTree. getPathBetweenRows(int index0, int index1)Returns the paths (inclusive) between the specified rows.TreePathJTree. getPathForLocation(int x, int y)Returns the path for the node at the specified location.TreePathJTree. getPathForRow(int row)Returns the path for the specified row.TreePathJTree. getSelectionPath()Returns the path to the first selected node.TreePath[]JTree. getSelectionPaths()Returns the paths of all selected values.Methods in javax.swing that return types with arguments of type TreePath Modifier and Type Method Description protected Enumeration<TreePath>JTree. getDescendantToggledPaths(TreePath parent)Returns anEnumerationofTreePathsthat have been expanded that are descendants ofparent.Enumeration<TreePath>JTree. getExpandedDescendants(TreePath parent)Returns anEnumerationof the descendants of the pathparentthat are currently expanded.Methods in javax.swing with parameters of type TreePath Modifier and Type Method Description voidJTree. addSelectionPath(TreePath path)Adds the node identified by the specifiedTreePathto the current selection.voidJTree. addSelectionPaths(TreePath[] paths)Adds each path in the array of paths to the current selection.voidJTree.EmptySelectionModel. addSelectionPaths(TreePath[] paths)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidJTree. collapsePath(TreePath path)Ensures that the node identified by the specified path is collapsed and viewable.voidJTree. expandPath(TreePath path)Ensures that the node identified by the specified path is expanded and viewable.voidJTree. fireTreeCollapsed(TreePath path)Notifies all listeners that have registered interest for notification on this event type.voidJTree. fireTreeExpanded(TreePath path)Notifies all listeners that have registered interest for notification on this event type.voidJTree. fireTreeWillCollapse(TreePath path)Notifies all listeners that have registered interest for notification on this event type.voidJTree. fireTreeWillExpand(TreePath path)Notifies all listeners that have registered interest for notification on this event type.protected Enumeration<TreePath>JTree. getDescendantToggledPaths(TreePath parent)Returns anEnumerationofTreePathsthat have been expanded that are descendants ofparent.Enumeration<TreePath>JTree. getExpandedDescendants(TreePath parent)Returns anEnumerationof the descendants of the pathparentthat are currently expanded.RectangleJTree. getPathBounds(TreePath path)Returns theRectanglethat the specified node will be drawn into.intJTree. getRowForPath(TreePath path)Returns the row that displays the node identified by the specified path.booleanJTree. hasBeenExpanded(TreePath path)Returns true if the node identified by the path has ever been expanded.booleanJTree. isCollapsed(TreePath path)Returns true if the value identified by path is currently collapsed, this will return false if any of the values in path are currently not being displayed.booleanJTree. isExpanded(TreePath path)Returns true if the node identified by the path is currently expanded,booleanJTree. isPathEditable(TreePath path)ReturnsisEditable.booleanJTree. isPathSelected(TreePath path)Returns true if the item identified by the path is currently selected.booleanJTree. isVisible(TreePath path)Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded.voidJTree. makeVisible(TreePath path)Ensures that the node identified by path is currently viewable.protected booleanJTree. removeDescendantSelectedPaths(TreePath path, boolean includePath)Removes any paths in the selection that are descendants ofpath.voidJTree. removeSelectionPath(TreePath path)Removes the node identified by the specified path from the current selection.voidJTree.EmptySelectionModel. removeSelectionPaths(TreePath[] paths)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidJTree. removeSelectionPaths(TreePath[] paths)Removes the nodes identified by the specified paths from the current selection.voidJTree. scrollPathToVisible(TreePath path)Makes sure all the path components in path are expanded (except for the last path component) and scrolls so that the node identified by the path is displayed.voidJTree. setAnchorSelectionPath(TreePath newPath)Sets the path identified as the anchor.protected voidJTree. setExpandedState(TreePath path, boolean state)Sets the expanded state of thisJTree.voidJTree. setLeadSelectionPath(TreePath newPath)Sets the path identifies as the lead.voidJTree. setSelectionPath(TreePath path)Selects the node identified by the specified path.voidJTree.EmptySelectionModel. setSelectionPaths(TreePath[] paths)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidJTree. setSelectionPaths(TreePath[] paths)Selects the nodes identified by the specified array of paths.voidJTree. startEditingAtPath(TreePath path)Selects the node identified by the specified path and initiates editing.Method parameters in javax.swing with type arguments of type TreePath Modifier and Type Method Description protected voidJTree. removeDescendantToggledPaths(Enumeration<TreePath> toRemove)Removes any descendants of theTreePathsintoRemovethat have been expanded.Constructors in javax.swing with parameters of type TreePath Constructor Description AccessibleJTreeNode(JTree t, TreePath p, Accessible ap)Constructs an AccessibleJTreeNode -
Uses of TreePath in javax.swing.event
Fields in javax.swing.event declared as TreePath Modifier and Type Field Description protected TreePathTreeSelectionEvent. newLeadSelectionPathleadSelectionPath after the paths changed, may be null.protected TreePathTreeSelectionEvent. oldLeadSelectionPathleadSelectionPath before the paths changed, may be null.protected TreePathTreeExpansionEvent. pathPath to the value this event represents.protected TreePathTreeModelEvent. pathPath to the parent of the nodes that have changed.protected TreePath[]TreeSelectionEvent. pathsPaths this event represents.Methods in javax.swing.event that return TreePath Modifier and Type Method Description TreePathTreeSelectionEvent. getNewLeadSelectionPath()Returns the current lead path.TreePathTreeSelectionEvent. getOldLeadSelectionPath()Returns the path that was previously the lead path.TreePathTreeExpansionEvent. getPath()Returns the path to the value that has been expanded/collapsed.TreePathTreeSelectionEvent. getPath()Returns the first path element.TreePath[]TreeSelectionEvent. getPaths()Returns the paths that have been added or removed from the selection.TreePathTreeModelEvent. getTreePath()For all events, except treeStructureChanged, returns the parent of the changed nodes.Methods in javax.swing.event with parameters of type TreePath Modifier and Type Method Description booleanTreeSelectionEvent. isAddedPath(TreePath path)Returns whether the specified path was added to the selection.Constructors in javax.swing.event with parameters of type TreePath Constructor Description TreeExpansionEvent(Object source, TreePath path)Constructs a TreeExpansionEvent object.TreeModelEvent(Object source, TreePath path)Used to create an event when the node structure has changed in some way, identifying the path to the root of the modified subtree as a TreePath object.TreeModelEvent(Object source, TreePath path, int[] childIndices, Object[] children)Used to create an event when nodes have been changed, inserted, or removed, identifying the path to the parent of the modified items as a TreePath object.TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)Represents a change in the selection of aTreeSelectionModel.TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)Represents a change in the selection of aTreeSelectionModel. -
Uses of TreePath in javax.swing.plaf
Methods in javax.swing.plaf that return TreePath Modifier and Type Method Description abstract TreePathTreeUI. getClosestPathForLocation(JTree tree, int x, int y)Returns the path to the node that is closest to x,y.abstract TreePathTreeUI. getEditingPath(JTree tree)Returns the path to the element that is being edited.abstract TreePathTreeUI. getPathForRow(JTree tree, int row)Returns the path for passed in row.Methods in javax.swing.plaf with parameters of type TreePath Modifier and Type Method Description abstract RectangleTreeUI. getPathBounds(JTree tree, TreePath path)Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.abstract intTreeUI. getRowForPath(JTree tree, TreePath path)Returns the row that the last item identified in path is visible at.abstract voidTreeUI. startEditingAtPath(JTree tree, TreePath path)Selects the last item in path and tries to edit it. -
Uses of TreePath in javax.swing.plaf.basic
Fields in javax.swing.plaf.basic declared as TreePath Modifier and Type Field Description protected TreePathBasicTreeUI. editingPathPath that is being edited.Fields in javax.swing.plaf.basic with type parameters of type TreePath Modifier and Type Field Description protected Hashtable<TreePath,Boolean>BasicTreeUI. drawingCacheUsed for minimizing the drawing of vertical lines.Methods in javax.swing.plaf.basic that return TreePath Modifier and Type Method Description TreePathBasicTreeUI. getClosestPathForLocation(JTree tree, int x, int y)Returns the path to the node that is closest to x,y.TreePathBasicTreeUI. getEditingPath(JTree tree)Returns the path to the element that is being edited.protected TreePathBasicTreeUI. getLastChildPath(TreePath parent)Returns a path to the last child ofparent.TreePathBasicTreeUI. getPathForRow(JTree tree, int row)Returns the path for passed in row.Methods in javax.swing.plaf.basic with parameters of type TreePath Modifier and Type Method Description protected voidBasicTreeUI. checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)If themouseXandmouseYare in the expand/collapse region of therow, this will toggle the row.protected TreePathBasicTreeUI. getLastChildPath(TreePath parent)Returns a path to the last child ofparent.RectangleBasicTreeUI. getPathBounds(JTree tree, TreePath path)Returns the Rectangle enclosing the label portion that the last item in path will be drawn into.intBasicTreeUI. getRowForPath(JTree tree, TreePath path)Returns the row that the last item identified in path is visible at.protected voidBasicTreeUI. handleExpandControlClick(TreePath path, int mouseX, int mouseY)Messaged when the user clicks the particular row, this invokestoggleExpandState.protected booleanBasicTreeUI. isLocationInExpandControl(TreePath path, int mouseX, int mouseY)ReturnstrueifmouseXandmouseYfall in the area of row that is used to expand/collapse the node and the node atrowdoes not represent a leaf.protected voidBasicTreeUI. paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)Paints the expand (toggle) part of a row.protected voidBasicTreeUI. paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)Paints the horizontal part of the leg.protected voidBasicTreeUI. paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)Paints the renderer part of a row.protected voidBasicTreeUI. paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)Paints the vertical part of the leg.protected voidBasicTreeUI. pathWasCollapsed(TreePath path)Messaged from theVisibleTreeNodeafter it has collapsed.protected voidBasicTreeUI. pathWasExpanded(TreePath path)Messaged from theVisibleTreeNodeafter it has been expanded.protected voidBasicTreeUI. selectPathForEvent(TreePath path, MouseEvent event)Messaged to update the selection based on aMouseEventover a particular row.protected booleanBasicTreeUI. shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)Returnstrueif the expand (toggle) control should be drawn for the specified row.protected booleanBasicTreeUI. startEditing(TreePath path, MouseEvent event)Will start editing for node if there is acellEditorandshouldSelectCellreturnstrue.voidBasicTreeUI. startEditingAtPath(JTree tree, TreePath path)Selects the last item in path and tries to edit it.protected voidBasicTreeUI. toggleExpandState(TreePath path)Expands path if it is not expanded, or collapses row if it is expanded.protected voidBasicTreeUI. updateExpandedDescendants(TreePath path)Updates the expanded state of all the descendants ofpathby getting the expanded descendants from the tree and forwarding to the tree state. -
Uses of TreePath in javax.swing.plaf.multi
Methods in javax.swing.plaf.multi that return TreePath Modifier and Type Method Description TreePathMultiTreeUI. getClosestPathForLocation(JTree a, int b, int c)Invokes thegetClosestPathForLocationmethod on each UI handled by this object.TreePathMultiTreeUI. getEditingPath(JTree a)Invokes thegetEditingPathmethod on each UI handled by this object.TreePathMultiTreeUI. getPathForRow(JTree a, int b)Invokes thegetPathForRowmethod on each UI handled by this object.Methods in javax.swing.plaf.multi with parameters of type TreePath Modifier and Type Method Description RectangleMultiTreeUI. getPathBounds(JTree a, TreePath b)Invokes thegetPathBoundsmethod on each UI handled by this object.intMultiTreeUI. getRowForPath(JTree a, TreePath b)Invokes thegetRowForPathmethod on each UI handled by this object.voidMultiTreeUI. startEditingAtPath(JTree a, TreePath b)Invokes thestartEditingAtPathmethod on each UI handled by this object. -
Uses of TreePath in javax.swing.tree
Fields in javax.swing.tree declared as TreePath Modifier and Type Field Description protected TreePathDefaultTreeCellEditor. lastPathLast path that was selected.protected TreePathDefaultTreeSelectionModel. leadPathLast path that was added.protected TreePath[]DefaultTreeSelectionModel. selectionPaths that are currently selected.Methods in javax.swing.tree that return TreePath Modifier and Type Method Description TreePathDefaultTreeSelectionModel. getLeadSelectionPath()Returns the last path that was added.TreePathTreeSelectionModel. getLeadSelectionPath()Returns the last path that was added.TreePathTreePath. getParentPath()Returns theTreePathof the parent.abstract TreePathAbstractLayoutCache. getPathClosestTo(int x, int y)Returns the path to the node that is closest to x,y.TreePathFixedHeightLayoutCache. getPathClosestTo(int x, int y)Returns the path to the node that is closest to x,y.TreePathVariableHeightLayoutCache. getPathClosestTo(int x, int y)Returns the path to the node that is closest to x,y.abstract TreePathAbstractLayoutCache. getPathForRow(int row)Returns the path for passed in row.TreePathFixedHeightLayoutCache. getPathForRow(int row)Returns the path for passed in row.TreePathVariableHeightLayoutCache. getPathForRow(int row)Returns the path forrow.TreePathDefaultTreeSelectionModel. getSelectionPath()Returns the first path in the selection.TreePathTreeSelectionModel. getSelectionPath()Returns the first path in the selection.TreePath[]DefaultTreeSelectionModel. getSelectionPaths()Returns the selection.TreePath[]TreeSelectionModel. getSelectionPaths()Returns the paths in the selection.TreePathTreePath. pathByAddingChild(Object child)Returns a new path containing all the elements of this path pluschild.Methods in javax.swing.tree that return types with arguments of type TreePath Modifier and Type Method Description abstract Enumeration<TreePath>AbstractLayoutCache. getVisiblePathsFrom(TreePath path)Returns anEnumeratorthat increments over the visible paths starting at the passed in location.Enumeration<TreePath>FixedHeightLayoutCache. getVisiblePathsFrom(TreePath path)Returns an Enumerator that increments over the visible paths starting at the passed in location.Enumeration<TreePath>VariableHeightLayoutCache. getVisiblePathsFrom(TreePath path)Returns anEnumeratorthat increments over the visible paths starting at the passed in location.Methods in javax.swing.tree with parameters of type TreePath Modifier and Type Method Description voidDefaultTreeSelectionModel. addSelectionPath(TreePath path)Adds path to the current selection.voidTreeSelectionModel. addSelectionPath(TreePath path)Adds path to the current selection.voidDefaultTreeSelectionModel. addSelectionPaths(TreePath[] paths)Adds paths to the current selection.voidTreeSelectionModel. addSelectionPaths(TreePath[] paths)Adds paths to the current selection.protected booleanDefaultTreeSelectionModel. arePathsContiguous(TreePath[] paths)Returns true if the paths are contiguous, or this object has no RowMapper.protected booleanDefaultTreeSelectionModel. canPathsBeAdded(TreePath[] paths)Used to test if a particular set ofTreePaths can be added.protected booleanDefaultTreeSelectionModel. canPathsBeRemoved(TreePath[] paths)Returns true if the paths can be removed without breaking the continuity of the model.abstract RectangleAbstractLayoutCache. getBounds(TreePath path, Rectangle placeIn)Returns a rectangle giving the bounds needed to draw path.RectangleFixedHeightLayoutCache. getBounds(TreePath path, Rectangle placeIn)Returns a rectangle giving the bounds needed to draw path.RectangleVariableHeightLayoutCache. getBounds(TreePath path, Rectangle placeIn)Returns theRectangleenclosing the label portion into which the item identified bypathwill be drawn.abstract booleanAbstractLayoutCache. getExpandedState(TreePath path)Returns true if the path is expanded, and visible.booleanFixedHeightLayoutCache. getExpandedState(TreePath path)Returns true if the path is expanded, and visible.booleanVariableHeightLayoutCache. getExpandedState(TreePath path)Returns true if the path is expanded, and visible.abstract intAbstractLayoutCache. getRowForPath(TreePath path)Returns the row that the last item identified in path is visible at.intFixedHeightLayoutCache. getRowForPath(TreePath path)Returns the row that the last item identified in path is visible at.intVariableHeightLayoutCache. getRowForPath(TreePath path)Returns the row where the last item identified in path is visible.int[]AbstractLayoutCache. getRowsForPaths(TreePath[] paths)Returns the rows that theTreePathinstances inpathare being displayed at.int[]RowMapper. getRowsForPaths(TreePath[] path)Returns the rows that the TreePath instances inpathare being displayed at.abstract intAbstractLayoutCache. getVisibleChildCount(TreePath path)Returns the number of visible children for row.intFixedHeightLayoutCache. getVisibleChildCount(TreePath path)Returns the number of visible children for row.intVariableHeightLayoutCache. getVisibleChildCount(TreePath path)Returns the number of visible children forpath.abstract Enumeration<TreePath>AbstractLayoutCache. getVisiblePathsFrom(TreePath path)Returns anEnumeratorthat increments over the visible paths starting at the passed in location.Enumeration<TreePath>FixedHeightLayoutCache. getVisiblePathsFrom(TreePath path)Returns an Enumerator that increments over the visible paths starting at the passed in location.Enumeration<TreePath>VariableHeightLayoutCache. getVisiblePathsFrom(TreePath path)Returns anEnumeratorthat increments over the visible paths starting at the passed in location.abstract voidAbstractLayoutCache. invalidatePathBounds(TreePath path)Instructs theLayoutCachethat the bounds forpathare invalid, and need to be updated.voidFixedHeightLayoutCache. invalidatePathBounds(TreePath path)Does nothing, FixedHeightLayoutCache doesn't cache width, and that is all that could change.voidVariableHeightLayoutCache. invalidatePathBounds(TreePath path)Instructs theLayoutCachethat the bounds forpathare invalid, and need to be updated.booleanTreePath. isDescendant(TreePath aTreePath)Returns true ifaTreePathis a descendant of thisTreePath.abstract booleanAbstractLayoutCache. isExpanded(TreePath path)Returns true if the value identified by row is currently expanded.booleanFixedHeightLayoutCache. isExpanded(TreePath path)Returns true if the value identified by row is currently expanded.booleanVariableHeightLayoutCache. isExpanded(TreePath path)Returns true if the value identified bypathis currently expanded.booleanDefaultTreeSelectionModel. isPathSelected(TreePath path)Returns true if the path,path, is in the current selection.booleanTreeSelectionModel. isPathSelected(TreePath path)Returns true if the path,path, is in the current selection.protected voidDefaultTreeSelectionModel. notifyPathChange(Vector<?> changedPaths, TreePath oldLeadSelection)Deprecated.As of JDK version 1.7voidDefaultTreeSelectionModel. removeSelectionPath(TreePath path)Removes path from the selection.voidTreeSelectionModel. removeSelectionPath(TreePath path)Removes path from the selection.voidDefaultTreeSelectionModel. removeSelectionPaths(TreePath[] paths)Removes paths from the selection.voidTreeSelectionModel. removeSelectionPaths(TreePath[] paths)Removes paths from the selection.abstract voidAbstractLayoutCache. setExpandedState(TreePath path, boolean isExpanded)Marks the pathpathexpanded state toisExpanded.voidFixedHeightLayoutCache. setExpandedState(TreePath path, boolean isExpanded)Marks the pathpathexpanded state toisExpanded.voidVariableHeightLayoutCache. setExpandedState(TreePath path, boolean isExpanded)Marks the pathpathexpanded state toisExpanded.voidDefaultTreeSelectionModel. setSelectionPath(TreePath path)Sets the selection to path.voidTreeSelectionModel. setSelectionPath(TreePath path)Sets the selection to path.voidDefaultTreeSelectionModel. setSelectionPaths(TreePath[] pPaths)Sets the selection.voidTreeSelectionModel. setSelectionPaths(TreePath[] paths)Sets the selection to path.voidDefaultTreeModel. valueForPathChanged(TreePath path, Object newValue)This sets the user object of the TreeNode identified by path and posts a node changed.voidTreeModel. valueForPathChanged(TreePath path, Object newValue)Messaged when the user has altered the value for the item identified bypathtonewValue.Constructors in javax.swing.tree with parameters of type TreePath Constructor Description TreePath(TreePath parent, Object lastPathComponent)Creates aTreePathwith the specified parent and element.
-