java.lang.Object
com.aoapps.hodgepodge.awt.LabelledGridLayout
- All Implemented Interfaces:
LayoutManager
Used to layout components in a grid. Each element in the
grid contains two components. The borders between these
two components are vertically aligned.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLabelledGridLayout(int rows, int columns) LabelledGridLayout(int rows, int columns, int hgap, int vgap, int cgap) LabelledGridLayout(int rows, int columns, int hgap, int vgap, int cgap, boolean stretchComponents) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(String place, Component component) voidlayoutContainer(Container parent) Fix the layout when stretchComponenets == false and the number of components is not evenly divisible by the number of cols or rows.minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) voidremoveLayoutComponent(Component component)
-
Field Details
-
rows
public final int rows -
columns
public final int columns -
hgap
public final int hgap -
vgap
public final int vgap -
cgap
public final int cgap -
stretchComponents
public final boolean stretchComponents
-
-
Constructor Details
-
LabelledGridLayout
public LabelledGridLayout(int rows, int columns) -
LabelledGridLayout
public LabelledGridLayout(int rows, int columns, int hgap, int vgap, int cgap) - Parameters:
rows- the number of rowscolumns- the number of columns, each column is two components widehgap- the space between columnsvgap- the space between rowscgap- the space between the two components in a column
-
LabelledGridLayout
public LabelledGridLayout(int rows, int columns, int hgap, int vgap, int cgap, boolean stretchComponents) - Parameters:
rows- the number of rowscolumns- the number of columns, each column is two components widehgap- the space between columnsvgap- the space between rowscgap- the space between the two components in a column
-
-
Method Details
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
layoutContainer
Fix the layout when stretchComponenets == false and the number of components is not evenly divisible by the number of cols or rows.- Specified by:
layoutContainerin interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
