public void align(RowHeights sharedRowHeights) {

		// Gather and map all layouts by their assigned row number.  This map *may not* be a 
		// complete range of rows from 0 to rowHeights.length;
		Map<Integer, List<RowLayout>> layoutsByRow = new HashMap<>();
		for (RowLayout layout : layouts) {
			int row = layout.getRowID();
			List<RowLayout> list = layoutsByRow.computeIfAbsent(row, k -> new ArrayList<>());
			list.add(layout);
		}

		// Walk the entire range of shared rows between each diff.  If a row height is 0, then 
		// neither side of the diff contains a RowLayout object for that row.
		List<RowLayout> updatedRows = alignRows(sharedRowHeights, layoutsByRow);
		layouts = new RowLayout[updatedRows.size()];
		int height = 0;
		for (int i = 0; i < layouts.length; i++) {
			layouts[i] = updatedRows.get(i);
			height += layouts[i].getHeight();
		}

		heightAbove = layouts[0].getHeightAbove();
		heightBelow = height - heightAbove;
		buildOffsets();
	}
Aligns the heights in this MultiRowLayout to match those in the given row heights array.  
This is used by the diff provider to align two sets of rows.  

@param sharedRowHeights the row heights
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/support/MultiRowLayout.java