Package ghidra.util.layout
Class MaximizeSpecificColumnGridLayout
java.lang.Object
ghidra.util.layout.MaximizeSpecificColumnGridLayout
- All Implemented Interfaces:
LayoutManager
MaximizeSpecificColumnGridLayout
is a row oriented grid type of layout.
It lays out rows of information in a table format using a specific number of columns.
Components are added left to right and top to bottom. The table will try to give each column
the width that is necessary to display the longest item in that column. The columns with the
widest desired component size will get reduced first if there isn't enough room.
The maximizeColumn(int) method allows you to indicate that you want to try to keep the size
of a column at the preferred size of the widest component in that column as the parent
container component is resized. Any column that has been maximized won't shrink until the
non-maximized windows are reduced to a width of zero.
The intent is that all non-maximized columns will shrink from largest to smallest so that
they all will become zero width together at which point the maximized columns will begin
shrinking in a similar manner.-
Constructor Summary
ConstructorDescriptionMaximizeSpecificColumnGridLayout
(int columnCount) Constructor with no gap between rows or columns.MaximizeSpecificColumnGridLayout
(int vgap, int hgap, int columnCount) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(String name, Component comp) void
layoutContainer
(Container parent) void
maximizeColumn
(int column) Allows you to indicate that you want to try to keep the size of a column at the preferred size of the widest component in that column as the parent container component is resized.minimumLayoutSize
(Container parent) preferredLayoutSize
(Container parent) void
-
Constructor Details
-
MaximizeSpecificColumnGridLayout
public MaximizeSpecificColumnGridLayout(int columnCount) Constructor with no gap between rows or columns.- Parameters:
columnCount
- the number of columns in this grid
-
MaximizeSpecificColumnGridLayout
public MaximizeSpecificColumnGridLayout(int vgap, int hgap, int columnCount) Constructor.- Parameters:
vgap
- the gap (in pixels) between rows.hgap
- the gap (in pixels) between the two columns.columnCount
- the number of columns in this grid
-
-
Method Details
-
maximizeColumn
public void maximizeColumn(int column) Allows you to indicate that you want to try to keep the size of a column at the preferred size of the widest component in that column as the parent container component is resized. Any column that has been maximized won't shrink until the non-maximized windows are reduced to a width of zero.- Parameters:
column
- the number (0 based) of the column to keep maximized.
-
preferredLayoutSize
- Specified by:
preferredLayoutSize
in interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSize
in interfaceLayoutManager
-
layoutContainer
- Specified by:
layoutContainer
in interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponent
in interfaceLayoutManager
-