MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / scrollPathToVisible

Method scrollPathToVisible

unused/javax/swing/JTree.java:2143–2156  ·  view source on GitHub ↗

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. Only works when this JTree is contained in a JScrollPane . @param path the TreePath identifying the n

(TreePath path)

Source from the content-addressed store, hash-verified

2141 * bring into view
2142 */
2143 public void scrollPathToVisible(TreePath path) {
2144 if(path != null) {
2145 makeVisible(path);
2146
2147 Rectangle bounds = getPathBounds(path);
2148
2149 if(bounds != null) {
2150 scrollRectToVisible(bounds);
2151 if (accessibleContext != null) {
2152 ((AccessibleJTree)accessibleContext).fireVisibleDataPropertyChange();
2153 }
2154 }
2155 }
2156 }
2157
2158 /**
2159 * Scrolls the item identified by row until it is displayed. The minimum

Callers 6

scrollRowToVisibleMethod · 0.95
scrollToPathMethod · 0.80
setSelectedNodeMethod · 0.80

Calls 3

makeVisibleMethod · 0.95
getPathBoundsMethod · 0.95

Tested by

no test coverage detected