Interface GraphElementAccessor<V,E>
-
- All Known Implementing Classes:
ClosestShapePickSupport
,LayoutLensShapePickSupport
,RadiusGraphElementAccessor
,RadiusPickSupport
,ShapePickSupport
,ViewLensShapePickSupport
public interface GraphElementAccessor<V,E>
Interface for coordinate-based selection of graph components.- Author:
- Tom Nelson, Joshua O'Madadhain
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description E
getEdge(Layout<V,E> layout, double x, double y)
V
getVertex(Layout<V,E> layout, double x, double y)
Returns the vertex, if any, associated with (x, y).java.util.Collection<V>
getVertices(Layout<V,E> layout, java.awt.Shape rectangle)
-
-
-
Method Detail
-
getVertex
V getVertex(Layout<V,E> layout, double x, double y)
Returns the vertex, if any, associated with (x, y).- Parameters:
layout
- the layout instance that records the positions for all verticesx
- the x coordinate of the pick pointy
- the y coordinate of the pick point- Returns:
- the vertex associated with (x, y)
-
getVertices
java.util.Collection<V> getVertices(Layout<V,E> layout, java.awt.Shape rectangle)
- Parameters:
layout
- the layout instance that records the positions for all verticesrectangle
- the region in which the returned vertices are located- Returns:
- the vertices whose locations given by
layout
are contained withinrectangle
-
getEdge
E getEdge(Layout<V,E> layout, double x, double y)
- Parameters:
layout
- the context in which the location is definedx
- the x coordinate of the locationy
- the y coordinate of the location- Returns:
- an edge which is associated with the location
(x,y)
as given bylayout
, generally by reference to the edge's endpoints
-
-