public class RadiusPickSupport<V,E> extends RadiusGraphElementAccessor<V,E> implements GraphElementAccessor<V,E>
maxDistance
Constructor and Description |
---|
RadiusPickSupport() |
RadiusPickSupport(double maxDistance)
Creates an instance with the specified maximum distance.
|
Modifier and Type | Method and Description |
---|---|
E |
getEdge(Layout<V,E> layout,
double x,
double y)
Gets the edge nearest to the location of the (x,y) location selected.
|
E |
getEdge(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(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(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.
|
getVertices
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVertices
public RadiusPickSupport()
public RadiusPickSupport(double maxDistance)
maxDistance
- the farthest that a vertex can be from the selection point
and still be 'picked'public V getVertex(Layout<V,E> layout, double x, double y)
getVertex
in interface GraphElementAccessor<V,E>
getVertex
in class RadiusGraphElementAccessor<V,E>
layout
- the context in which the location is definedx
- the x coordinate of the locationy
- the y coordinate of the location(x,y)
as given by layout
public V getVertex(Layout<V,E> layout, double x, double y, double maxDistance)
getVertex
in class RadiusGraphElementAccessor<V,E>
layout
- the layout instance that records the positions for all verticesx
- the x coordinate of the pick pointy
- the y coordinate of the pick pointmaxDistance
- vertices whose from (x, y) is > this cannot be returnedpublic E getEdge(Layout<V,E> layout, double x, double y)
getEdge
in interface GraphElementAccessor<V,E>
getEdge
in class RadiusGraphElementAccessor<V,E>
layout
- the layout instance that records the positions for all verticesx
- the x coordinate of the pick pointy
- the y coordinate of the pick pointpublic E getEdge(Layout<V,E> layout, double x, double y, double maxDistance)
getEdge
in class RadiusGraphElementAccessor<V,E>
x
- the x coordinate of the pick pointy
- the y coordinate of the pick pointmaxDistance
- vertices whose from (x, y) is > this cannot be returnedlayout
- the context in which the location is definedCopyright © 2015. All rights reserved.