Class ComparisonItemLayout

java.lang.Object
ghidra.app.merge.structures.ComparisonItemLayout
All Implemented Interfaces:
LayoutManager

public class ComparisonItemLayout extends Object implements LayoutManager
LayoutManager for arranging the labels for each column in a ComparisonItem. The main idea here is that each type of item has a set of min/max widths associated with each column that is used to align like types of items so that their fields line up.

The tricky part is how to handle sizing them as the view is expanded or contracted. Initially, all columns are given their minimum width and if the total is greater then the available width, the last columns are clipped. If the available width is greater than the sum of the minimum widths, the extra width (10 at a time) is given to each column that still has text wider than its current width. This is repeated until the extra width is used up or all columns have all the width they need to display their text.