@Override
	public int getScrollableUnitIncrement(int topOfScreen, int direction) {
		int max = 0;
		if (direction > 0) { // if scrolling down
			if (topOfScreen < heightAbove - maxHeightAbove) {
				return heightAbove - maxHeightAbove - topOfScreen;
			}
			max = heightAbove + heightBelow - topOfScreen;
		}
		else {
			max = -topOfScreen;
		}

		int localTopOfScreen = topOfScreen - heightAbove; //adjust to field coordinates
		for (Field element : fields) {
			if (element != null) {
				int x = element.getScrollableUnitIncrement(localTopOfScreen, direction, max);
				if ((direction > 0) && (x > 0) && (x < max)) {
					max = x;
				}
				else if ((direction < 0) && (x < 0) && (x > max)) {
					max = x;
				}
			}
		}

		return max;
	}
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