X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=third-party%2Fnet.sf.jung2%2Fsrc%2Fmain%2Fjava%2Fedu%2Fuci%2Fics%2Fjung%2Falgorithms%2Flayout%2FGraphElementAccessor.java;fp=third-party%2Fnet.sf.jung2%2Fsrc%2Fmain%2Fjava%2Fedu%2Fuci%2Fics%2Fjung%2Falgorithms%2Flayout%2FGraphElementAccessor.java;h=4cf1c51c920337a3c1f761601de4e9ebc1da2073;hp=0000000000000000000000000000000000000000;hb=42210c03b0a4c54706320ba9f55794c0abd4d201;hpb=7576b38152b393793b1c9ec3df0ff86685f95236 diff --git a/third-party/net.sf.jung2/src/main/java/edu/uci/ics/jung/algorithms/layout/GraphElementAccessor.java b/third-party/net.sf.jung2/src/main/java/edu/uci/ics/jung/algorithms/layout/GraphElementAccessor.java new file mode 100644 index 0000000000..4cf1c51c92 --- /dev/null +++ b/third-party/net.sf.jung2/src/main/java/edu/uci/ics/jung/algorithms/layout/GraphElementAccessor.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2005, the JUNG Project and the Regents of the University of + * California All rights reserved. + * + * This software is open-source under the BSD license; see either "license.txt" + * or http://jung.sourceforge.net/license.txt for a description. + * + * + * Created on Apr 12, 2005 + */ +package edu.uci.ics.jung.algorithms.layout; + +import java.awt.Shape; +import java.util.Collection; + +/** + * Interface for coordinate-based selection of graph components. + * @author Tom Nelson + * @author Joshua O'Madadhain + */ +public interface GraphElementAccessor +{ + /** + * Returns a vertex which is associated with the + * location (x,y). This is typically determined + * with respect to the vertex's location as specified + * by a Layout. + */ + V getVertex(Layout layout, double x, double y); + + /** + * Returns the vertices contained within {@code rectangle} relative + * to {@code layout}. + */ + Collection getVertices(Layout layout, Shape rectangle); + + /** + * Returns an edge which is associated with the + * location (x,y). This is typically determined + * with respect to the edge's location as specified + * by a {@code Layout}. + */ + E getEdge(Layout layout, double x, double y); + +} \ No newline at end of file