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.
  • Method Details

    • 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 vertices
      x - the x coordinate of the pick point
      y - the y coordinate of the pick point
      Returns:
      the vertex associated with (x, y)
    • getVertices

      Collection<V> getVertices(Layout<V,E> layout, Shape rectangle)
      Parameters:
      layout - the layout instance that records the positions for all vertices
      rectangle - the region in which the returned vertices are located
      Returns:
      the vertices whose locations given by layout are contained within rectangle
    • getEdge

      E getEdge(Layout<V,E> layout, double x, double y)
      Parameters:
      layout - the context in which the location is defined
      x - the x coordinate of the location
      y - the y coordinate of the location
      Returns:
      an edge which is associated with the location (x,y) as given by layout, generally by reference to the edge's endpoints