edu.uci.ics.jung3d.algorithms.layout
Class RadiusGraphElementAccessor<V,E>
java.lang.Object
edu.uci.ics.jung3d.algorithms.layout.RadiusGraphElementAccessor<V,E>
- All Implemented Interfaces:
- GraphElementAccessor<V,E>
public class RadiusGraphElementAccessor<V,E>
- extends Object
- implements 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.
- Author:
- Tom Nelson, Joshua O'Madadhain
Method Summary |
V |
getVertex(Layout<V,E> layout,
javax.vecmath.Point3f p)
Gets the vertex nearest to the location of the (x,y) location selected,
within a distance of maxDistance. |
V |
getVertex(Layout<V,E> layout,
javax.vecmath.Point3f p,
double maxDistance)
Gets the vertex nearest to the location of the (x,y) location selected,
within a distance of maxDistance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxDistance
protected double maxDistance
RadiusGraphElementAccessor
public RadiusGraphElementAccessor()
RadiusGraphElementAccessor
public RadiusGraphElementAccessor(double maxDistance)
getVertex
public V getVertex(Layout<V,E> layout,
javax.vecmath.Point3f p)
- 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 provde a more efficient implementation.
- Specified by:
getVertex
in interface GraphElementAccessor<V,E>
getVertex
public V getVertex(Layout<V,E> layout,
javax.vecmath.Point3f p,
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 provde a more efficient implementation.
- Parameters:
x
- y
- maxDistance
- temporarily overrides member maxDistance
Copyright © 2008 null. All Rights Reserved.