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

Method getClosestRowForLocation

unused/javax/swing/JTree.java:2340–2342  ·  view source on GitHub ↗

Returns the row to the node that is closest to x,y. If no nodes are viewable or there is no model, returns -1. Otherwise, it always returns a valid row. To test if the returned object is exactly at x, y, get the bounds for the node at the returned row and test x, y against that. @param x an integ

(int x, int y)

Source from the content-addressed store, hash-verified

2338 * @see #getRowBounds
2339 */
2340 public int getClosestRowForLocation(int x, int y) {
2341 return getRowForPath(getClosestPathForLocation(x, y));
2342 }
2343
2344 /**
2345 * Returns true if the tree is being edited. The item that is being

Callers 2

dropLocationForPointMethod · 0.95

Calls 2

getRowForPathMethod · 0.95

Tested by

no test coverage detected