Package ghidra.util.layout
Class RowColumnLayout
- java.lang.Object
-
- ghidra.util.layout.RowColumnLayout
-
- All Implemented Interfaces:
java.awt.LayoutManager
public class RowColumnLayout extends java.lang.Object implements java.awt.LayoutManager
This layout arranges components in rows, putting as many components as possible on a row and using as many rows as necessary. All components are sized the same, the largest width and the largest height of all components. The components prefer to be layout as close to a square as possible.
-
-
Field Summary
Fields Modifier and Type Field Description static int
COLUMN
static int
LEFT_TO_RIGHT
static int
ROW
static int
TOP_TO_BOTTOM
-
Constructor Summary
Constructors Constructor Description RowColumnLayout(int hgap, int vgap, int orientation, int maxSize)
Constructs a new RowColumnLayout
-
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)
java.awt.Dimension
minimumLayoutSize(java.awt.Container parent)
java.awt.Dimension
preferredLayoutSize(java.awt.Container parent)
void
removeLayoutComponent(java.awt.Component comp)
void
setMaxSize(int maxSize)
-
-
-
Field Detail
-
ROW
public static final int ROW
- See Also:
- Constant Field Values
-
COLUMN
public static final int COLUMN
- See Also:
- Constant Field Values
-
LEFT_TO_RIGHT
public static final int LEFT_TO_RIGHT
- See Also:
- Constant Field Values
-
TOP_TO_BOTTOM
public static final int TOP_TO_BOTTOM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RowColumnLayout
public RowColumnLayout(int hgap, int vgap, int orientation, int maxSize)
Constructs a new RowColumnLayout- Parameters:
hgap
- the gap (in pixels) between columnsvgap
- the gap (in pixels) between rowsorientation
- either ROW or COLUMN. If ROW, components are layed out in rows up to prefered width, using as many rows a necessary. If COLUMN, components are layed out in columns up to the prefered height, using as many columns as necessary.maxSize
-
-
-
Method Detail
-
addLayoutComponent
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
- Specified by:
addLayoutComponent
in interfacejava.awt.LayoutManager
- See Also:
LayoutManager.addLayoutComponent(String, Component)
-
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)
- Specified by:
removeLayoutComponent
in interfacejava.awt.LayoutManager
- See Also:
LayoutManager.removeLayoutComponent(Component)
-
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
- Specified by:
preferredLayoutSize
in interfacejava.awt.LayoutManager
- See Also:
LayoutManager.preferredLayoutSize(Container)
-
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
- Specified by:
minimumLayoutSize
in interfacejava.awt.LayoutManager
- See Also:
LayoutManager.minimumLayoutSize(Container)
-
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Specified by:
layoutContainer
in interfacejava.awt.LayoutManager
- See Also:
LayoutManager.layoutContainer(Container)
-
setMaxSize
public void setMaxSize(int maxSize)
- Parameters:
maxSize
-
-
-