java.awt

Class GridBagConstraints

public class GridBagConstraints extends Object implements Cloneable, Serializable

This specifies the constraints for a component managed by the GridBagLayout layout manager.
Field Summary
intanchor
static intBOTH
Fill in both directions.
static intCENTER
Position in the center.
static intEAST
Position to the east.
intfill
static intFIRST_LINE_END
Position to where the first text line would end.
static intFIRST_LINE_START
Position to where the first text line would start.
intgridheight
intgridwidth
intgridx
intgridy
static intHORIZONTAL
Fill horizontally.
Insetsinsets
intipadx
intipady
static intLAST_LINE_END
Position to where the last text line would end.
static intLAST_LINE_START
Position to where the last text line would start.
static intLINE_END
Position to where a text line would end.
static intLINE_START
Position to where a text line would start.
static intNONE
Don't fill.
static intNORTH
Position to the north.
static intNORTHEAST
Position to the northeast.
static intNORTHWEST
Position to the northwest.
static intPAGE_END
Position to where a page ends.
static intPAGE_START
Position to where a page starts.
static intRELATIVE
Occupy all remaining cells except last cell.
static intREMAINDER
Occupy all remaining cells.
static intSOUTH
Position to the south.
static intSOUTHEAST
Position to the southeast.
static intSOUTHWEST
Position to the southwest.
static intVERTICAL
Fill vertically.
doubleweightx
doubleweighty
static intWEST
Position to the west.
Constructor Summary
GridBagConstraints()
Create a new GridBagConstraints object with the default parameters.
GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady)
Create a new GridBagConstraints object with the indicated parameters.
Method Summary
Objectclone()
Create a copy of this object.

Field Detail

anchor

public int anchor

BOTH

public static final int BOTH
Fill in both directions.

CENTER

public static final int CENTER
Position in the center.

EAST

public static final int EAST
Position to the east.

fill

public int fill

FIRST_LINE_END

public static final int FIRST_LINE_END
Position to where the first text line would end. Equals to NORTHEAST for horizontal left-to-right orientations.

FIRST_LINE_START

public static final int FIRST_LINE_START
Position to where the first text line would start. Equals to NORTHWEST for horizontal left-to-right orientations.

gridheight

public int gridheight

gridwidth

public int gridwidth

gridx

public int gridx

gridy

public int gridy

HORIZONTAL

public static final int HORIZONTAL
Fill horizontally.

insets

public Insets insets

ipadx

public int ipadx

ipady

public int ipady

LAST_LINE_END

public static final int LAST_LINE_END
Position to where the last text line would end. Equals to SOUTHEAST for horizontal left-to-right orientations.

LAST_LINE_START

public static final int LAST_LINE_START
Position to where the last text line would start. Equals to SOUTHWEST for horizontal left-to-right orientations.

LINE_END

public static final int LINE_END
Position to where a text line would end. Equals to EAST for left-to-right orientations.

LINE_START

public static final int LINE_START
Position to where a text line would start. Equals to WEST for left-to-right orientations.

NONE

public static final int NONE
Don't fill.

NORTH

public static final int NORTH
Position to the north.

NORTHEAST

public static final int NORTHEAST
Position to the northeast.

NORTHWEST

public static final int NORTHWEST
Position to the northwest.

PAGE_END

public static final int PAGE_END
Position to where a page ends. Equals SOUTH for horizontal orientations.

PAGE_START

public static final int PAGE_START
Position to where a page starts. Equals NORTH for horizontal orientations.

RELATIVE

public static final int RELATIVE
Occupy all remaining cells except last cell.

REMAINDER

public static final int REMAINDER
Occupy all remaining cells.

SOUTH

public static final int SOUTH
Position to the south.

SOUTHEAST

public static final int SOUTHEAST
Position to the southeast.

SOUTHWEST

public static final int SOUTHWEST
Position to the southwest.

VERTICAL

public static final int VERTICAL
Fill vertically.

weightx

public double weightx

weighty

public double weighty

WEST

public static final int WEST
Position to the west.

Constructor Detail

GridBagConstraints

public GridBagConstraints()
Create a new GridBagConstraints object with the default parameters.

GridBagConstraints

public GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady)
Create a new GridBagConstraints object with the indicated parameters.

Method Detail

clone

public Object clone()
Create a copy of this object.