private List<FieldRow> layoutRows(List<TextField> fields, int maxLines) {

		List<FieldRow> newSubFields = new ArrayList<>();
		int startY = -heightAbove;
		int ySoFar = startY;
		int currentRow = 0;
		boolean tooManyLines = fields.size() > maxLines;
		for (int i = 0; i < fields.size() && i < maxLines; i++) {
			TextField field = fields.get(i);
			if (tooManyLines && (i == maxLines - 1)) {
				FieldElement element = field.getFieldElement(0, 0);
				TextField newField = createClippedField(element);
				newSubFields.add(new FieldRow(newField, currentRow, ySoFar));
				isClipped = true;
			}
			else {
				newSubFields.add(new FieldRow(field, currentRow, ySoFar));
				isClipped |= field.isClipped();
			}

			ySoFar += field.getHeight();
			currentRow += field.getNumRows();
		}

		isClipped |= tooManyLines;

		return newSubFields;
	}
A {@link TextField} that takes in other TextFields.

<P>This class allows clients to create custom text layout behavior by combining individual
TextFields that dictate layout behavior.  As an example, consider this rendering:
<pre>
	1)  This is some text...
	2)	This
		is
		more
		text
</pre>
In this example, 1) is a row of text inside of a {@link ClippingTextField}.  Row 2) is a
multi-line text rendering specified in a single {@link FlowLayoutTextField}, using a
narrow width to trigger the field to place each element on its own line.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/CompositeVerticalLayoutTextField.java