protected int getGreaterBoundedLocation(int placementLocation, int placementLength,
			int boundLocation, int boundLength) {
		return Integer.min(placementLocation, boundLocation + boundLength - placementLength);
	}
With all inputs on a line (one-dimensional), returns a location that is shifted enough from
the placementLocation such that the greater end of bounds specified by boundLocation
is not exceeded (i.e., the new location is not bigger than {@code #boundLocation}).

@param placementLocation starting location that gets shifted
@param placementLength the length of the to-be-placed dimension on the (one-dimensional)
       line
@param boundLocation the bounds on the line that must not be exceeded to the greater side
@param boundLength the length of the outer bounds dimension on the (one-dimensional) line
@return the shifted result
Ghidra/Framework/Docking/src/main/java/docking/widgets/shapes/PopupWindowPlacer.java