@Override
	public void paint(JComponent c, Graphics g, PaintContext context, Rectangle rect,
			LayoutBackgroundColorManager colorManager, FieldLocation cursorLocation) {

		if ((rect.y >= heightAbove + heightBelow) || (rect.y + rect.height < 0)) {
			return;
		}

		g.translate(0, heightAbove);
		rect.y -= heightAbove;
		// Draw each actual field
		for (int i = 0; i < fields.length; i++) {
			paintGapSelection(g, colorManager, rect, i);
			RowColLocation cursorLoc = null;
			if (cursorLocation != null && cursorLocation.fieldNum == i) {
				cursorLoc = new RowColLocation(cursorLocation.row, cursorLocation.col);
			}
			FieldBackgroundColorManager fieldColorManager =
				colorManager.getFieldBackgroundColorManager(i);
			paintFieldBackground(g, i, fieldColorManager);
			fields[i].paint(c, g, context, rect, fieldColorManager, cursorLoc, getHeight());
		}
		paintGapSelection(g, colorManager, rect, -1);
		g.translate(0, -heightAbove);
		rect.y += heightAbove;
	}
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