2 * Copyright (c) 2005, the JUNG Project and the Regents of the University of
3 * California All rights reserved.
5 * This software is open-source under the BSD license; see either "license.txt"
6 * or http://jung.sourceforge.net/license.txt for a description.
9 * Created on Apr 12, 2005
11 package edu.uci.ics.jung.algorithms.layout;
13 import java.awt.Shape;
14 import java.util.Collection;
17 * Interface for coordinate-based selection of graph components.
19 * @author Joshua O'Madadhain
21 public interface GraphElementAccessor<V, E>
24 * Returns a vertex which is associated with the
25 * location <code>(x,y)</code>. This is typically determined
26 * with respect to the vertex's location as specified
27 * by a <code>Layout</code>.
29 V getVertex(Layout<V,E> layout, double x, double y);
32 * Returns the vertices contained within {@code rectangle} relative
35 Collection<V> getVertices(Layout<V,E> layout, Shape rectangle);
38 * Returns an edge which is associated with the
39 * location <code>(x,y)</code>. This is typically determined
40 * with respect to the edge's location as specified
41 * by a {@code Layout}.
43 E getEdge(Layout<V,E> layout, double x, double y);