/** * Gets the vertex nearest to the location of the (x,y) location selected, * within a distance of <tt>maxDistance</tt>. Iterates through all * visible vertices and checks their distance from the click. Override this * method to provde a more efficient implementation. */ public V getVertex(Layout<V,E> layout, double x, double y) { return getVertex(layout, x, y, this.maxDistance); }
/** * Gets the vertex nearest to the location of the (x,y) location selected, * within a distance of <tt>maxDistance</tt>. Iterates through all * visible vertices and checks their distance from the click. Override this * method to provide a more efficient implementation. * * @param layout the context in which the location is defined * @param x the x coordinate of the location * @param y the y coordinate of the location * @return a vertex which is associated with the location {@code (x,y)} * as given by {@code layout} */ public V getVertex(Layout<V,E> layout, double x, double y) { return getVertex(layout, x, y, this.maxDistance); }
/** * Gets the vertex nearest to the location of the (x,y) location selected, * within a distance of <tt>maxDistance</tt>. Iterates through all * visible vertices and checks their distance from the click. Override this * method to provide a more efficient implementation. * @param layout the layout instance that records the positions for all vertices * @param x the x coordinate of the pick point * @param y the y coordinate of the pick point * @param maxDistance vertices whose from (x, y) is > this cannot be returned * @return the vertex whose center is closest to the pick point (x, y) */ public V getVertex(Layout<V,E> layout, double x, double y, double maxDistance) { return super.getVertex(layout, x, y, maxDistance); }