@Override
	public boolean enterLayout(FieldLocation cursorLoc, int lastX, boolean fromTop) {
		// locate the field that the cursor will enter
		int y = fromTop ? 0 : heightAbove + heightBelow - 1;
		int index = findAppropriateFieldIndex(lastX, y);
		if (index < 0) {
			return false;
		}
		cursorLoc.fieldNum = index;
		Field field = fields[index];

		int x = lastX;
		y = fromTop ? -field.getHeightAbove() : field.getHeightBelow() - 1;

		cursorLoc.row = field.getRow(y);
		cursorLoc.col = field.getCol(cursorLoc.row, x);
		lastCursorY = y;
		return true;

	}
Returns the row number of this layout with respect to its containing layout.
@return the row number of this layout with respect to its containing layout.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/support/RowLayout.java