Initial opendaylight infrastructure commit!!
[controller.git] / third-party / net.sf.jung2 / src / main / java / edu / uci / ics / jung / algorithms / layout / GraphElementAccessor.java
1 /*
2  * Copyright (c) 2005, the JUNG Project and the Regents of the University of
3  * California All rights reserved.
4  * 
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.
7  * 
8  *
9  * Created on Apr 12, 2005
10  */
11 package edu.uci.ics.jung.algorithms.layout;
12
13 import java.awt.Shape;
14 import java.util.Collection;
15
16 /**
17  * Interface for coordinate-based selection of graph components.
18  * @author Tom Nelson
19  * @author Joshua O'Madadhain
20  */
21 public interface GraphElementAccessor<V, E>
22 {
23     /**
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>.
28      */
29     V getVertex(Layout<V,E> layout, double x, double y);
30     
31     /**
32      * Returns the vertices contained within {@code rectangle} relative
33      * to {@code layout}.
34      */
35     Collection<V> getVertices(Layout<V,E> layout, Shape rectangle);
36
37     /**
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}.
42      */
43     E getEdge(Layout<V,E> layout, double x, double y);
44
45 }