Class RadiusPickSupport<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.RadiusGraphElementAccessor<V,E>
-
- edu.uci.ics.jung.visualization.picking.RadiusPickSupport<V,E>
-
- All Implemented Interfaces:
edu.uci.ics.jung.algorithms.layout.GraphElementAccessor<V,E>
- Direct Known Subclasses:
ClassicPickSupport
public class RadiusPickSupport<V,E> extends edu.uci.ics.jung.algorithms.layout.RadiusGraphElementAccessor<V,E> implements edu.uci.ics.jung.algorithms.layout.GraphElementAccessor<V,E>
Simple implementation of PickSupport that returns the vertex or edge that is closest to the specified location. This implementation provides the same picking options that were available in previous versions of AbstractLayout.
-
-
Constructor Summary
Constructors Constructor Description RadiusPickSupport()
RadiusPickSupport(double maxDistance)
the layout will always be provided by the VisualizationViewer this is supporting picking for
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
getEdge(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y)
Gets the edge nearest to the location of the (x,y) location selected.E
getEdge(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y, double maxDistance)
Gets the edge nearest to the location of the (x,y) location selected, within a distance of maxDistance, Iterates through all visible edges and checks their distance from the click.V
getVertex(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y)
Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance.V
getVertex(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y, double maxDistance)
Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance.-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.RadiusGraphElementAccessor
getVertices
-
-
-
-
Method Detail
-
getVertex
public V getVertex(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y)
Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance. Iterates through all visible vertices and checks their distance from the click. Override this method to provide a more efficient implementation.
-
getVertex
public V getVertex(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y, double maxDistance)
Gets the vertex nearest to the location of the (x,y) location selected, within a distance of maxDistance. Iterates through all visible vertices and checks their distance from the click. Override this method to provide a more efficient implementation.
-
getEdge
public E getEdge(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y)
Gets the edge nearest to the location of the (x,y) location selected. Calls the longer form of the call.
-
getEdge
public E getEdge(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, double x, double y, double maxDistance)
Gets the edge nearest to the location of the (x,y) location selected, within a distance of maxDistance, Iterates through all visible edges and checks their distance from the click. Override this method to provide a more efficient implementation.
-
-