@Override
	public int getCompressableWidth() {
		//
		// Can only compress the last field, as the rest are potentially part of a grid surrounded
		// by other layouts
		//
		// Notes: we have to account for any offset for fields that are disabled and are in
		//        the beginning of the row.
		//
		int startX = fields[0].getStartX();
		int rowWidth = startX;

		for (int i = 0; i < fields.length - 1; i++) {
			Field field = fields[i];
			int width = field.getWidth(); // layout manager width
			rowWidth += width;
		}

		Field lastField = fields[fields.length - 1];
		int width = lastField.getWidth();
		int preferredWidth = lastField.getPreferredWidth();
		rowWidth += Math.min(width, preferredWidth);
		return rowWidth;
	}
Constructs a RowLayout from an array of fields
@param fields the set of fields that make up the entire layout
@param rowID the rowID of this row layout in the overall layout.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/support/RowLayout.java