Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt

Class GridBagConstraints

java.lang.Object
|
+--java.awt.GridBagConstraints

All Implemented Interfaces:

Cloneable, Serializable


public class GridBagConstraints

extends Object

implements Cloneable, Serializable

This specifies the constraints for a component managed by the GridBagLayout layout manager.

Field Summary

static intBOTH

Fill in both directions.
static intCENTER

Position in the center.
static intEAST

Position to the east.
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.
static intHORIZONTAL

Fill horizontally.
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.
static intWEST

Position to the west.
intanchor

intfill

intgridheight

intgridwidth

intgridx

intgridy

java.awt.Insetsinsets

intipadx

intipady

doubleweightx

doubleweighty

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, java.awt.Insets insets, int ipadx, int ipady)

Create a new GridBagConstraints object with the indicated parameters.

Method Summary

java.lang.Objectclone()

Create a copy of this object.

Field Details

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.


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.


HORIZONTAL

public static final int HORIZONTAL

Fill horizontally.


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.


WEST

public static final int WEST

Position to the west.


anchor

public int anchor


fill

public int fill


gridheight

public int gridheight


gridwidth

public int gridwidth


gridx

public int gridx


gridy

public int gridy


insets

public Insets insets


ipadx

public int ipadx


ipady

public int ipady


weightx

public double weightx


weighty

public double weighty


Constructor Details

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, java.awt.Insets insets, int ipadx, int ipady)

Create a new GridBagConstraints object with the indicated parameters.

Parameters:


Method Details

clone

public Object clone()

Create a copy of this object.