Package com.aoindustries.awt
Class LabelledGridLayout
- java.lang.Object
-
- com.aoindustries.awt.LabelledGridLayout
-
- All Implemented Interfaces:
LayoutManager
public class LabelledGridLayout extends Object implements 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.
-
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLayoutComponent(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.DimensionminimumLayoutSize(Container parent)DimensionpreferredLayoutSize(Container parent)voidremoveLayoutComponent(Component component)
-
-
-
Constructor Detail
-
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 Detail
-
addLayoutComponent
public void addLayoutComponent(String place, Component component)
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
layoutContainer
public 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.- Specified by:
layoutContainerin interfaceLayoutManager
-
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
removeLayoutComponent
public void removeLayoutComponent(Component component)
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
-