@Override
	public int getMaxCharactersForWidth(int width) {
		int remainingWidth = width;
		int totalCharacters = 0;
		for (FieldElement fieldElement : fieldElements) {
			int nextWidth = fieldElement.getStringWidth();
			if (nextWidth >= remainingWidth) {
				totalCharacters += fieldElement.getMaxCharactersForWidth(remainingWidth);
				break;
			}
			remainingWidth -= nextWidth;
			totalCharacters += fieldElement.length();
		}

		return totalCharacters;
	}
A FieldElement that is composed of other FieldElements.  The elements are laid out horizontally.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/CompositeFieldElement.java