|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.layout.RadiusGraphElementAccessor<V,E>
public class RadiusGraphElementAccessor<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.
Field Summary | |
---|---|
protected double |
maxDistance
|
Constructor Summary | |
---|---|
RadiusGraphElementAccessor()
|
|
RadiusGraphElementAccessor(double maxDistance)
|
Method Summary | |
---|---|
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. |
Collection<V> |
getVertices(Layout<V,E> layout,
Shape rectangle)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double maxDistance
Constructor Detail |
---|
public RadiusGraphElementAccessor()
public RadiusGraphElementAccessor(double maxDistance)
Method Detail |
---|
public V getVertex(Layout<V,E> layout, double x, double y)
getVertex
in interface GraphElementAccessor<V,E>
public V getVertex(Layout<V,E> layout, double x, double y, double maxDistance)
x
- y
- maxDistance
- temporarily overrides member maxDistancepublic Collection<V> getVertices(Layout<V,E> layout, Shape rectangle)
getVertices
in interface GraphElementAccessor<V,E>
public E getEdge(Layout<V,E> layout, double x, double y)
getEdge
in interface GraphElementAccessor<V,E>
public E getEdge(Layout<V,E> layout, double x, double y, double maxDistance)
x
- y
- maxDistance
- temporarily overrides member maxDistance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |