public class LabelledGridLayout extends Object implements LayoutManager
Modifier and Type | Field and Description |
---|---|
int |
cgap |
int |
columns |
int |
hgap |
int |
rows |
boolean |
stretchComponents |
int |
vgap |
Constructor and Description |
---|
LabelledGridLayout(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) |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(String place,
Component component) |
void |
layoutContainer(Container parent)
Fix the layout when stretchComponenets==false
and the number of components is not evenly divisible
by the number of cols or rows.
|
Dimension |
minimumLayoutSize(Container parent) |
Dimension |
preferredLayoutSize(Container parent) |
void |
removeLayoutComponent(Component component) |
public final int rows
public final int columns
public final int hgap
public final int vgap
public final int cgap
public final boolean stretchComponents
public LabelledGridLayout(int rows, int columns)
public LabelledGridLayout(int rows, int columns, int hgap, int vgap, int cgap)
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 columnpublic LabelledGridLayout(int rows, int columns, int hgap, int vgap, int cgap, boolean stretchComponents)
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 columnpublic void addLayoutComponent(String place, Component component)
addLayoutComponent
in interface LayoutManager
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
public void removeLayoutComponent(Component component)
removeLayoutComponent
in interface LayoutManager
Copyright © 2016. All rights reserved.