Functions like the GridLayout layout manager, but each column/row can have its own width/height @version 27-Jan-1999 @author Geert Vernaeve |
Creates a grid layout with a default of one column per component, in a single row. |
Creates a grid layout with the specified number of rows and
columns.
One, but not both, of |
Creates a grid layout with the specified number of rows and
columns.
In addition, the horizontal and vertical gaps are set to the specified values. Horizontal gaps are placed at the left and right edges, and between each of the columns. Vertical gaps are placed at the top and bottom edges, and between each of the rows.
One, but not both, of |
Gets the number of rows in this layout. @return the number of rows in this layout. |
Sets the number of rows in this layout to the specified value.
@param rows the number of rows in this layout.
@exception IllegalArgumentException if the value of both
rows and cols is set to zero.
|
Gets the number of columns in this layout. @return the number of columns in this layout. |
Sets the number of columns in this layout to the specified value.
@param cols the number of columns in this layout.
@exception IllegalArgumentException if the value of both
rows and cols is set to zero.
|
Gets the horizontal gap between components. @return the horizontal gap between components. |
Sets the horizontal gap between components to the specified value. @param hgap the horizontal gap between components. |
Gets the vertical gap between components. @return the vertical gap between components. |
Sets the vertical gap between components to the specified value. @param vgap the vertical gap between components. |
Adds the specified component with the specified name to the layout. @param name the name of the component. @param comp the component to be added. |
Removes the specified component from the layout. @param comp the component to be removed. |
Determines the preferred size of the container argument using
this grid layout.
The preferred width of a grid layout is the sum of the widths of the columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container. The preferred height of a grid layout is the sum of the heights of the rows, plus the vertical padding times the number of rows plus one, plus the top and left insets of the target container. @param target the container in which to do the layout. @return the preferred dimensions to lay out the subcomponents of the specified container. @see java.awt.GridLayout#minimumLayoutSize @see java.awt.Container#getPreferredSize() @since JDK1.0 |
Determines the minimum size of the container argument using this grid layout. @param target the container in which to do the layout. @return the minimum dimensions needed to lay out the subcomponents of the specified container. @see java.awt.GridLayout#preferredLayoutSize @see java.awt.Container#doLayout |
Lays out the specified container using this layout.
This method reshapes the components in the specified target
container in order to satisfy the constraints of the
The grid layout manager determines the size of individual components by dividing the free space in the container into 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. @param target the container in which to do the layout. @see java.awt.Container @see java.awt.Container#doLayout |
Returns the string representation of this grid layout's values. @return a string representation of this grid layout. |