|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.GridLayout
gui.layouts.PreferredSizeGridLayout
public class PreferredSizeGridLayout
| Constructor Summary | |
|---|---|
PreferredSizeGridLayout()
|
|
PreferredSizeGridLayout(int rows,
int cols)
Creates a grid layout with the specified number of rows and columns. |
|
PreferredSizeGridLayout(int rows,
int cols,
int hgap,
int vgap)
Creates a grid layout with the specified number of rows and columns. |
|
| Method Summary | |
|---|---|
BoundableInterface |
getBoundableInterface()
|
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container using this layout. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
setBoundableInterface(BoundableInterface boundableInterface)
|
| Methods inherited from class java.awt.GridLayout |
|---|
addLayoutComponent, getColumns, getHgap, getRows, getVgap, minimumLayoutSize, removeLayoutComponent, setColumns, setHgap, setRows, setVgap, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PreferredSizeGridLayout()
public PreferredSizeGridLayout(int rows,
int cols)
One, but not both, of rows and cols can
be zero, which means that any number of objects can be placed in a
row or in a column.
rows - the rows, with the value zero meaning
any number of rows.cols - the columns, with the value zero meaning
any number of columns.
public PreferredSizeGridLayout(int rows,
int cols,
int hgap,
int vgap)
In addition, the horizontal and vertical gaps are set to the specified values. Horizontal gaps are placed affineTransform the left and right edges, and between each of the columns. Vertical gaps are placed affineTransform the top and bottom edges, and between each of the rows.
One, but not both, of rows and cols can
be zero, which means that any number of objects can be placed in a
row or in a column.
rows - the rows, with the value zero meaning
any number of rows.cols - the columns, with the value zero meaning
any number of columns.hgap - the horizontal gap.vgap - the vertical gap.
java.lang.IllegalArgumentException - if the of rows
or cols is invalid.| Method Detail |
|---|
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpreferredLayoutSize in class java.awt.GridLayoutpublic void layoutContainer(java.awt.Container parent)
This method reshapes the components in the specified target
container in order to satisfy the constraints of the
PreferredSizeGridLayout object.
The grid layout manager determines the size of individual components by dividing the free space in the container into equal-sized portions according to the number of rows and columns in the layout. The container's free space equals the container's size minus any insets and any specified horizontal or vertical gap. All components in a grid layout are given the Minimum of the same size or the preferred size.
layoutContainer in interface java.awt.LayoutManagerlayoutContainer in class java.awt.GridLayoutContainer,
Container.doLayout()public BoundableInterface getBoundableInterface()
public void setBoundableInterface(BoundableInterface boundableInterface)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||