java.awt
Class GridBagConstraints

java.lang.Object
  extended by java.awt.GridBagConstraints
All Implemented Interfaces:
Serializable, Cloneable

public class GridBagConstraints
extends Object
implements Cloneable, Serializable

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

See Also:
Serialized Form

Field Summary
 int anchor
           
static int BOTH
          Fill in both directions.
static int CENTER
          Position in the center.
static int EAST
          Position to the east.
 int fill
           
static int FIRST_LINE_END
          Position to where the first text line would end.
static int FIRST_LINE_START
          Position to where the first text line would start.
 int gridheight
           
 int gridwidth
           
 int gridx
           
 int gridy
           
static int HORIZONTAL
          Fill horizontally.
 Insets insets
           
 int ipadx
           
 int ipady
           
static int LAST_LINE_END
          Position to where the last text line would end.
static int LAST_LINE_START
          Position to where the last text line would start.
static int LINE_END
          Position to where a text line would end.
static int LINE_START
          Position to where a text line would start.
static int NONE
          Don't fill.
static int NORTH
          Position to the north.
static int NORTHEAST
          Position to the northeast.
static int NORTHWEST
          Position to the northwest.
static int PAGE_END
          Position to where a page ends.
static int PAGE_START
          Position to where a page starts.
static int RELATIVE
          Occupy all remaining cells except last cell.
static int REMAINDER
          Occupy all remaining cells.
static int SOUTH
          Position to the south.
static int SOUTHEAST
          Position to the southeast.
static int SOUTHWEST
          Position to the southwest.
static int VERTICAL
          Fill vertically.
 double weightx
           
 double weighty
           
static int WEST
          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
 Object clone()
          Create a copy of this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Don't fill.

See Also:
Constant Field Values

BOTH

public static final int BOTH
Fill in both directions.

See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
Fill horizontally.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Fill vertically.

See Also:
Constant Field Values

CENTER

public static final int CENTER
Position in the center.

See Also:
Constant Field Values

NORTH

public static final int NORTH
Position to the north.

See Also:
Constant Field Values

NORTHEAST

public static final int NORTHEAST
Position to the northeast.

See Also:
Constant Field Values

EAST

public static final int EAST
Position to the east.

See Also:
Constant Field Values

SOUTHEAST

public static final int SOUTHEAST
Position to the southeast.

See Also:
Constant Field Values

SOUTH

public static final int SOUTH
Position to the south.

See Also:
Constant Field Values

SOUTHWEST

public static final int SOUTHWEST
Position to the southwest.

See Also:
Constant Field Values

WEST

public static final int WEST
Position to the west.

See Also:
Constant Field Values

NORTHWEST

public static final int NORTHWEST
Position to the northwest.

See Also:
Constant Field Values

RELATIVE

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

See Also:
Constant Field Values

REMAINDER

public static final int REMAINDER
Occupy all remaining cells.

See Also:
Constant Field Values

PAGE_START

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

See Also:
Constant Field Values

PAGE_END

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

See Also:
Constant Field Values

LINE_START

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

See Also:
Constant Field Values

LINE_END

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

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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 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.

Overrides:
clone in class Object
Returns:
a copy of the Object
See Also:
Cloneable