protected void pickContainedVertices(VisualizationViewer<V, E> vv, Point2D down, Point2D out,
			boolean clear) {

		Layout<V, E> layout = vv.getGraphLayout();
		PickedState<V> pickedVertexState = vv.getPickedVertexState();

		Rectangle2D pickRectangle = new Rectangle2D.Double();
		pickRectangle.setFrameFromDiagonal(down, out);

		if (pickedVertexState != null) {
			if (clear) {
				pickedVertexState.clear();
			}
			GraphElementAccessor<V, E> pickSupport = vv.getPickSupport();

			Collection<V> picked = pickSupport.getVertices(layout, pickRectangle);
			for (V v : picked) {
				pickedVertexState.pick(v, true);
			}
		}
	}
pick the vertices inside the rectangle created from points 'down' and 'out' (two diagonally
opposed corners of the rectangle)

@param vv the viewer containing the layout and picked state
@param down one corner of the rectangle
@param out the other corner of the rectangle
@param clear whether to reset existing picked state
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/event/mouse/JungPickingGraphMousePlugin.java