protected PositionableRectangle getPlacement(PositionableRectangle result,
			PositionableDimension toBePlaced, PositionableRectangle context,
			PositionableRectangle outer) {

		// Test major axis edge
		int placementMajorCoordinate;
		if (major.isLesser()) {
			placementMajorCoordinate = getLesserLocation(context.getMajorCoordinate(),
				context.getMajorLength(), toBePlaced.getMajorLength());
			int shiftedPlacement =
				getLesserBoundedLocation(placementMajorCoordinate, outer.getMajorCoordinate());
			if (placementMajorCoordinate < shiftedPlacement) {
				return null; // no solution on edge
			}
		}
		else if (major.isGreater()) {
			placementMajorCoordinate = getGreaterLocation(context.getMajorCoordinate(),
				context.getMajorLength(), toBePlaced.getMajorLength());
			int shiftedPlacement = getGreaterBoundedLocation(placementMajorCoordinate,
				toBePlaced.getMajorLength(), outer.getMajorCoordinate(), outer.getMajorLength());
			if (placementMajorCoordinate > shiftedPlacement) {
				return null; // no solution on edge
			}
		}
		else {
			throw new AssertException("Should not get here.");
		}

		// Find placement on the edge using minor axis
		Integer placementMinorCoordinate =
			getPlacement(toBePlaced.getMinorLength(), context.getMinorCoordinate(),
				context.getMinorLength(), outer.getMinorCoordinate(), outer.getMinorLength());
		if (placementMinorCoordinate == null) {
			return null; // no solution on edge
		}

		result.set(placementMajorCoordinate, placementMinorCoordinate, toBePlaced);
		return result;
	}
Returns a Rectangle solution for the placement of a toBePlaced Dimension.
<p>
When dealing with solutions for the top or bottom edge, we are considering <B>vertical</B>
to be the major axis with y/height values representing that axis, and <B>horizontal</B>
to be the minor axis with x/width values representing that axis.  When dealing with
solutions for the left and right edge, these major and minor axes are switched.

@param result the new instance of the resulting class type to be returned
@param toBePlaced the wrapped toBePlaced Dimension
@param context the wrapped context Rectangle
@param outer the wrapped outer boundsRectangle
@return the resultant wrapped Rectangle
Ghidra/Framework/Docking/src/main/java/docking/widgets/shapes/PopupWindowPlacer.java