public class

VariableGridLayout

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

Class Overview

A layout manager for a container that lays out grids. Allows setting the relative sizes of rows and columns.

Summary

Public Constructors
VariableGridLayout(int rows, int cols)
Creates a grid layout with the specified rows and specified columns.
VariableGridLayout(int rows, int cols, int hgap, int vgap)
Creates a grid layout with the specified rows, columns, horizontal gap, and vertical gap.
Public Methods
double getColFraction(int colNum)
double getRowFraction(int rowNum)
void layoutContainer(Container parent)
Lays out the container in the specified panel.
void setColFraction(int colNum, double fraction)
void setRowFraction(int rowNum, double fraction)
String toString()
Returns the String representation of this VariableGridLayout's values.
[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)

Creates a grid layout with the specified rows and specified columns.

Parameters
rows the rows
cols the columns

public VariableGridLayout (int rows, int cols, int hgap, int vgap)

Creates a grid layout with the specified rows, columns, horizontal gap, and vertical gap.

Parameters
rows the rows
cols the columns
hgap the horizontal gap variable
vgap the vertical gap variable
Throws
IllegalArgumentException If the rows and columns are invalid.

Public Methods

public double getColFraction (int colNum)

public double getRowFraction (int rowNum)

public void layoutContainer (Container parent)

Lays out the container in the specified panel.

Parameters
parent the specified component being laid out
See Also

public void setColFraction (int colNum, double fraction)

public void setRowFraction (int rowNum, double fraction)

public String toString ()

Returns the String representation of this VariableGridLayout's values.

Returns
  • a string representation of this grid layout