Returns the path to the node that is closest to x,y. If no nodes are currently viewable, or there is no model, returns null , otherwise it always returns a valid path. To test if the node is exactly at x, y, get the node's bounds and test x, y against that. @param x an integer giving
(int x, int y)
| 2313 | * @see #getPathBounds |
| 2314 | */ |
| 2315 | public TreePath getClosestPathForLocation(int x, int y) { |
| 2316 | TreeUI tree = getUI(); |
| 2317 | |
| 2318 | if(tree != null) |
| 2319 | return tree.getClosestPathForLocation(this, x, y); |
| 2320 | return null; |
| 2321 | } |
| 2322 | |
| 2323 | /** |
| 2324 | * Returns the row to the node that is closest to x,y. If no nodes |
no test coverage detected