private Integer getPlacement(int placementLength, int contextLocation, int contextLength,
			int boundLocation, int boundLength) {
		int lesserLocation = getLesserLocation(contextLocation, contextLength, placementLength);
		int lesserBoundedLocation = getLesserBoundedLocation(lesserLocation, boundLocation);
		int greaterLocation = getGreaterLocation(contextLocation, contextLength, placementLength);
		int greaterBoundedLocation =
			getGreaterBoundedLocation(greaterLocation, placementLength, boundLocation, boundLength);

		if (greaterBoundedLocation < lesserBoundedLocation) {
			return null; // no solution
		}

		int centerLocation = getCenterLocation(contextLocation, contextLength, placementLength);

		if (greaterBoundedLocation < centerLocation) {
			return getSolutionWhenGreaterBoundedLessThanCenter(lesserLocation,
				lesserBoundedLocation, greaterBoundedLocation);
		}

		if (lesserBoundedLocation > centerLocation) {
			return getSolutionWhenLesserBoundedGreaterThanCenter(lesserBoundedLocation,
				greaterBoundedLocation, greaterLocation);
		}

		return getSolutionWhenCenterBounded(lesserLocation, lesserBoundedLocation, centerLocation,
			greaterBoundedLocation, greaterLocation);
	}
With all inputs on a line (one-dimensional), returns the placement for the minor axis.
In other words, this algorithm is used for both conditions: the major axis being horizontal
and the minor axis being vertical; the major axis being vertical, and the minor axis being
horizontal.  These two situations are independent, but the same algorithm is used.
<p>
<B>Algorithm Design</B><p>
Note: smaller values are up and bigger values are down, in the presentation below.
<p>
In trying to allay some confusion (yes it can be confusing), note that for any given major
axis (say horizontal), this axis can portray values that are further right or further left.
This is why the left edge and right edge are noted by horizontal axes values... one
intersects the horizontal axis further to the left and the other intersects the axis
further to the right.
<p>
The location of placements on the left or right edges, however are noted by vertical axis
values, with TOP having a lesser value and bottom having a greater value.  These locations
specified by the minor dimension, and are the "one dimension" that is the subject of this
placement algorithm.
<p>
The scenario with top and bottom edge reverses the major dimension to be vertical and the
minor dimension to be horizontal.
<p>
Keeping with the original right edge scenario begun above, we are trying to find a minor
axis placement on the right (major) edge.  For this placement, one can refer to
documentation elsewhere in this class, but essentially, we are trying to place a popup
area against a context rectangle without exceeding the outer bounds (screen) rectangle.  But,
again, we are only considering the placement against the right edge already chosen and only
trying to fit in the vertical dimension against this edge.  Thus, this algorithm only needs
values for this one dimension.  These are the length of the placement area in this one
dimension, and both the location and lengths of the context and outer bounds rectangles
for this one dimension.
<p>
The algorithm considers three main locations (cells) on this minor axis.  When the minor
axis is vertical (which is our current scenario), they are TOP, CENTER, and BOTTOM.  When
the minor axis is horizontal, they are LEFT, CENTER, and RIGHT.  These locations are
nominal, but are also allowed to be shifted so that the placement fits within the outer
bounds.  Thus, we have five key values, in which three have fixed relative placements
(when using <B>positive</B> lengths):
<pre>
        <B>lesserLocation</B> (nominal placement on TOP or LEFT)
              &le;
        <B>centerLocation</B> (nominal placement such that the center of the context rectangle
                         and the center of the popup area align with each other)
              &le;
        <B>greaterLocation</B> (nominal placement on BOTTOM or RIGHT)
</pre>
and these two can be found at various placements amongst the other three:
<pre>
        <B>lesserBoundedLocation &ge; lesserLocation</B> (lesserLocation shifted so TOP or
            LEFT fits outer bounds)
        <B>greaterBoundedLocation &le; greaterLocation</B> (lesserLocation shifted BOTTOM or
            RIGHT fits outer bounds)
</pre>
Note that with an ill-constructed scenario, as shown here, we return <B>no solution</B>:
<pre>
        <B>greaterBoundedLocation</B>
                  &lt;
        <B>lesserBoundedLocation</B>
</pre>
Given a better-constructed scenario, the <B>lesserBoundedLocation</B> and
<B>greaterBoundedLocation</B> values can fall between the other three values at the following
possible locations:
<pre>
        <B>lesserLocation</B>
            <B>&rarr;</B> <B>lesserBoundedLocation</B> (&ge; <B>lesserLocation</B>)
            <B>&rarr;</B> <B>greaterBoundedLocation</B> (&le; <B>greaterLocation</B>)
        <B>centerLocation</B>
            <B>&rarr;</B> <B>lesserBoundedLocation</B> (&ge; <B>lesserLocation</B>)
            <B>&rarr;</B> <B>greaterBoundedLocation</B> (&le; <B>greaterLocation</B>)
        <B>greaterLocation</B>
</pre>
These layout possibilities can be broken down into three possibilities...
<pre>
        <B>lesserLocation</B>
            <B>&rarr;</B> <B>lesserBoundedLocation</B> (&ge; <B>lesserLocation</B>)
            <B>&rarr;</B> <B>greaterBoundedLocation</B>
        <B>centerLocation</B>
        <B>greaterLocation</B>
        ----------
        if start is LESSER
            if end is LESSER and lesserBoundedLocation != lesserLocation
                no solution
            else
                solution is lesserBoundedLocation
        else
            if end is LESSER
                solution is greaterBoundedLocation
            else
                no solution
</pre>
 or
<pre>
        <B>lesserLocation</B>
            <B>&rarr;</B> <B>lesserBoundedLocation</B> (&ge; <B>lesserLocation</B>)
        <B>centerLocation</B>
            <B>&rarr;</B> <B>greaterBoundedLocation</B> (&le; <B>greaterLocation</B>)
        <B>greaterLocation</B>
        ----------
        if start is GREATER
            if end is GREATER and greaterBoundedLocation != greaterLocation
                no solution
            else
                solution is greaterBoundedLocation
        else if start is LESSER
            if end is LESSER and lesserBoundedLocation != lesserLocation
                no solution
            else
                solution is lesserBoundedLocation
        else
            solution is centerLocation
</pre>
 or
<pre>
        <B>lesserLocation</B>
        <B>centerLocation</B>
            <B>&rarr;</B> <B>lesserBoundedLocation</B>
            <B>&rarr;</B> <B>greaterBoundedLocation</B> (&le; <B>greaterLocation</B>)
        <B>greaterLocation</B>
        ----------
        if start is GREATER
            if end is GREATER and greaterBoundedLocation != greaterLocation
                no solution
            else
                solution is greaterBoundedLocation
        else
            if end is GREATER
                solution is lesserBoundedLocation
            else
                no solution
</pre>
The algorithm breaks down into these scenarios and presents the solution as required.
@param placementLength the length of the placement Dimension on the line
@param contextLocation location of the context Rectangle on the line
@param contextLength the length of the context Rectangle Dimension on the line
@param boundLocation location of the outer bounds Rectangle on the line
@param boundLength  the length of the outer bounds Rectangle Dimension on the line
@return the resultant location on the line
Ghidra/Framework/Docking/src/main/java/docking/widgets/shapes/PopupWindowPlacer.java