Class ComparisonItemLayout
java.lang.Object
ghidra.app.merge.structures.ComparisonItemLayout
- All Implemented Interfaces:
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(String name, Component comp) voidlayoutContainer(Container parent) minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) voidvoidsetColumnWidths(ghidra.app.merge.structures.ComparisonItemLayout.ColumnWidths widths)
-
Constructor Details
-
ComparisonItemLayout
public ComparisonItemLayout()
-
-
Method Details
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
setColumnWidths
public void setColumnWidths(ghidra.app.merge.structures.ComparisonItemLayout.ColumnWidths widths)
-