Package ghidra.util.layout
Class MaximizeSpecificColumnGridLayout
- java.lang.Object
-
- ghidra.util.layout.MaximizeSpecificColumnGridLayout
-
- All Implemented Interfaces:
java.awt.LayoutManager
public class MaximizeSpecificColumnGridLayout extends java.lang.Object implements java.awt.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
Constructors Constructor Description MaximizeSpecificColumnGridLayout(int columnCount)
Constructor with no gap between rows or columns.MaximizeSpecificColumnGridLayout(int vgap, int hgap, int columnCount)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLayoutComponent(java.lang.String name, java.awt.Component comp)
void
layoutContainer(java.awt.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.java.awt.Dimension
minimumLayoutSize(java.awt.Container parent)
java.awt.Dimension
preferredLayoutSize(java.awt.Container parent)
void
removeLayoutComponent(java.awt.Component comp)
-
-
-
Constructor Detail
-
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 Detail
-
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
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
- Specified by:
preferredLayoutSize
in interfacejava.awt.LayoutManager
-
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
- Specified by:
minimumLayoutSize
in interfacejava.awt.LayoutManager
-
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Specified by:
layoutContainer
in interfacejava.awt.LayoutManager
-
addLayoutComponent
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
- Specified by:
addLayoutComponent
in interfacejava.awt.LayoutManager
-
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)
- Specified by:
removeLayoutComponent
in interfacejava.awt.LayoutManager
-
-