public class

VariableGridLayout

extends GridLayout
java.lang.Object
   ↳ java.awt.GridLayout
     ↳ sun.tools.jconsole.VariableGridLayout

Summary

Public Constructors
VariableGridLayout(int rows, int cols, int hgap, int vgap, boolean fillRows, boolean fillColumns)
Public Methods
boolean getFillColumn(JComponent c)
boolean getFillRow(JComponent c)
void layoutContainer(Container parent)
Lays out the specified container using this layout.
Dimension preferredLayoutSize(Container parent)
Determines the preferred size of the container argument using this grid layout.
void setFillColumn(JComponent c, boolean b)
void setFillRow(JComponent c, boolean b)
[Expand]
Inherited Methods
From class java.awt.GridLayout
From class java.lang.Object
From interface java.awt.LayoutManager

Public Constructors

public VariableGridLayout (int rows, int cols, int hgap, int vgap, boolean fillRows, boolean fillColumns)

Public Methods

public boolean getFillColumn (JComponent c)

public boolean getFillRow (JComponent c)

public void layoutContainer (Container parent)

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 GridLayout 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 same size.

Parameters
parent the container in which to do the layout

public Dimension preferredLayoutSize (Container parent)

Determines the preferred size of the container argument using this grid layout.

The preferred width of a grid layout is the largest preferred width of all of the components in the container times the number of columns, plus the horizontal padding times the number of columns minus one, plus the left and right insets of the target container.

The preferred height of a grid layout is the largest preferred height of all of the components in the container times the number of rows, plus the vertical padding times the number of rows minus one, plus the top and bottom insets of the target container.

Parameters
parent the container in which to do the layout
Returns
  • the preferred dimensions to lay out the subcomponents of the specified container

public void setFillColumn (JComponent c, boolean b)

public void setFillRow (JComponent c, boolean b)