@Override
	public E getEdge(Layout<V, E> layout, double viewSpaceX, double viewSpaceY) {

		Point2D viewSpacePoint = new Point2D.Double(viewSpaceX, viewSpaceY);
		Point graphSpacePoint =
			GraphViewerUtils.translatePointFromViewSpaceToGraphSpace(viewSpacePoint, vv);

		// create a box around the given point the size of 'pickSize'
		Rectangle2D pickArea = new Rectangle2D.Float(graphSpacePoint.x - pickSize / 2,
			graphSpacePoint.y - pickSize / 2, pickSize, pickSize);
		E closestEdge = null;
		double smallestDistance = Double.MAX_VALUE;
		for (E e : getFilteredEdges(layout)) {

			Shape edgeShape = GraphViewerUtils.getEdgeShapeInGraphSpace(vv, e);
			if (edgeShape == null) {
				continue;
			}

			// because of the transform, the edgeShape is now a GeneralPath
			// see if this edge is the closest of any that intersect
			if (edgeShape.intersects(pickArea)) {
				float[] coords = new float[6];
				GeneralPath path = new GeneralPath(edgeShape);
				PathIterator iterator = path.getPathIterator(null);
				if (iterator.isDone()) {
					// not sure how this can happen--0 length edge?
					continue;
				}

				iterator.next();
				iterator.currentSegment(coords);
				float segmentX = coords[0];
				float segmentY = coords[1];

				float deltaX = segmentX - graphSpacePoint.x;
				float deltaY = segmentY - graphSpacePoint.y;
				float currentDistance = deltaX * deltaX + deltaY * deltaY;
				if (currentDistance < smallestDistance) {
					smallestDistance = currentDistance;
					closestEdge = e;
				}
			}
		}

		return closestEdge;
	}
Overridden to handle edge picking with our custom edge placement.  The painting and picking
algorithms in Jung are all hard-coded to transform loop edges to above the vertex--there
is no way to plug our own transformation into Jung :(

@param layout
@param viewSpaceX The x under which to look for an edge (view coordinates)
@param viewSpaceY The y under which to look for an edge (view coordinates)
@return The closest edge to the given point; null if no edge near the point
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/shape/VisualGraphShapePickSupport.java