java.lang.Object | +--java.awt.GridBagConstraints
Safe:
static int
EAST
int
fill
static int
FIRST_LINE_END
ComponentOrienation.
static int
FIRST_LINE_START
ComponentOrienation.
int
gridx
gridx=0.
int
gridy
gridy=0.
Insets
insets
int
ipadx
int
ipady
static int
LAST_LINE_END
ComponentOrienation.
static int
LAST_LINE_START
ComponentOrienation.
static int
LINE_END
ComponentOrienation.
static int
LINE_START
ComponentOrienation.
static int
PAGE_END
ComponentOrienation.
static int
PAGE_START
ComponentOrienation.
static int
RELATIVE
gridwidth, gridheight),
or that this component be placed next to the previously added
component (gridx, gridy).
static int
REMAINDER
static int
SOUTH
static int
WEST
GridBagConstraints()
GridBagConstraint object with
all of its fields set to their default value.
GridBagConstraints(int gridx,
int gridy,
int gridwidth,
int gridheight,
double weightx,
double weighty,
int anchor,
int fill,
Insets insets,
int ipadx,
int ipady)
GridBagConstraints object with
all of its fields set to the passed-in arguments.
public static final int RELATIVE
gridwidth, gridheight),
or that this component be placed next to the previously added
component (gridx, gridy).
java.awt.GridBagConstraints#gridwidth,
java.awt.GridBagConstraints#gridheight,
java.awt.GridBagConstraints#gridx,
java.awt.GridBagConstraints#gridypublic static final int REMAINDER
public static final int NONE
public static final int BOTH
public static final int HORIZONTAL
public static final int VERTICAL
public static final int CENTER
public static final int NORTH
public static final int NORTHEAST
public static final int EAST
public static final int SOUTHEAST
public static final int SOUTH
public static final int SOUTHWEST
public static final int WEST
public static final int NORTHWEST
public static final int PAGE_START
ComponentOrienation. Equal to NORTH for horizontal
orientations.
public static final int PAGE_END
ComponentOrienation. Equal to SOUTH for horizontal
orientations.
public static final int LINE_START
ComponentOrienation. Equal to WEST for horizontal,
left-to-right orientations and EAST for horizontal, right-to-left
orientations.
public static final int LINE_END
ComponentOrienation. Equal to EAST for horizontal,
left-to-right orientations and WEST for horizontal, right-to-left
orientations.
public static final int FIRST_LINE_START
ComponentOrienation. Equal to NORTHWEST for horizontal,
left-to-right orientations and NORTHEAST for horizontal, right-to-left
orientations.
public static final int FIRST_LINE_END
ComponentOrienation. Equal to NORTHEAST for horizontal,
left-to-right orientations and NORTHWEST for horizontal, right-to-left
orientations.
public static final int LAST_LINE_START
ComponentOrienation. Equal to SOUTHWEST for horizontal,
left-to-right orientations and SOUTHEAST for horizontal, right-to-left
orientations.
public static final int LAST_LINE_END
ComponentOrienation. Equal to SOUTHEAST for horizontal,
left-to-right orientations and SOUTHWEST for horizontal, right-to-left
orientations.
public int gridx
gridx=0.
The leading edge of a component's display area is its left edge for
a horizontal, left-to-right container and its right edge for a
horizontal, right-to-left container.
The value
RELATIVE specifies that the component be placed
immediately following the component that was added to the container
just before this component was added.
The default value is RELATIVE.
gridx should be a non-negative value.
clone(),
java.awt.GridBagConstraints#gridy,
java.awt.ComponentOrientationpublic int gridy
gridy=0. The value
RELATIVE specifies that the component be placed just
below the component that was added to the container just before
this component was added.
The default value is RELATIVE.
gridy should be a non-negative value.
clone(),
java.awt.GridBagConstraints#gridxpublic int gridwidth
Use REMAINDER to specify that the component be the
last one in its row. Use RELATIVE to specify that the
component be the next-to-last one in its row.
gridwidth should be non-negative and the default
value is 1.
clone(),
java.awt.GridBagConstraints#gridheightpublic int gridheight
Use REMAINDER to specify that the component be the
last one in its column. Use RELATIVE to specify that
the component be the next-to-last one in its column.
gridheight should be a non-negative value and the
default value is 1.
clone(),
java.awt.GridBagConstraints#gridwidthpublic double weightx
The grid bag layout manager calculates the weight of a column to
be the maximum weightx of all the components in a
column. If the resulting layout is smaller horizontally than the area
it needs to fill, the extra space is distributed to each column in
proportion to its weight. A column that has a weight of zero receives
no extra space.
If all the weights are zero, all the extra space appears between the grids of the cell and the left and right edges.
The default value of this field is 0.
weightx should be a non-negative value.
clone(),
java.awt.GridBagConstraints#weightypublic double weighty
The grid bag layout manager calculates the weight of a row to be
the maximum weighty of all the components in a row.
If the resulting layout is smaller vertically than the area it
needs to fill, the extra space is distributed to each row in
proportion to its weight. A row that has a weight of zero receives no
extra space.
If all the weights are zero, all the extra space appears between the grids of the cell and the top and bottom edges.
The default value of this field is 0.
weighty should be a non-negative value.
clone(),
java.awt.GridBagConstraints#weightxpublic int anchor
There are two kinds of possible values: relative and
absolute. Relative values are interpreted relative to the container's
component orientation property while absolute values are not. The absolute
values are:
CENTER, NORTH, NORTHEAST,
EAST, SOUTHEAST, SOUTH,
SOUTHWEST, WEST, and NORTHWEST.
The relative values are: PAGE_START, PAGE_END,
LINE_START, LINE_END,
FIRST_LINE_START, FIRST_LINE_END,
LAST_LINE_START and LAST_LINE_END.
The default value is CENTER.
clone(),
java.awt.ComponentOrientationpublic int fill
The following values are valid for fill:
NONE: Do not resize the component.
HORIZONTAL: Make the component wide enough to fill
its display area horizontally, but do not change its height.
VERTICAL: Make the component tall enough to fill its
display area vertically, but do not change its width.
BOTH: Make the component fill its display area
entirely.
The default value is NONE.
clone()public Insets insets
The default value is new Insets(0, 0, 0, 0).
clone()public int ipadx
(ipadx * 2) pixels.
The default value is 0.
clone(),
java.awt.GridBagConstraints#ipadypublic int ipady
(ipady * 2) pixels.
The default value is 0.
clone(),
java.awt.GridBagConstraints#ipadxint tempX
int tempY
int tempWidth
int tempHeight
int minWidth
ipady, where the default will be 0.
ipadyint minHeight
ipadx, where the default will be 0.
ipadxprivate static final long serialVersionUID
public GridBagConstraints()
GridBagConstraint object with
all of its fields set to their default value.
public GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady)
GridBagConstraints object with
all of its fields set to the passed-in arguments.
Note: Because the use of this constructor hinders readability
of source code, this constructor should only be used by
automatic source code generation tools.
gridx - The initial gridx value.gridy - The initial gridy value.gridwidth - The initial gridwidth value.gridheight - The initial gridheight value.weightx - The initial weightx value.weighty - The initial weighty value.anchor - The initial anchor value.fill - The initial fill value.insets - The initial insets value.ipadx - The initial ipadx value.ipady - The initial ipady value.java.awt.GridBagConstraints#gridx,
java.awt.GridBagConstraints#gridy,
java.awt.GridBagConstraints#gridwidth,
java.awt.GridBagConstraints#gridheight,
java.awt.GridBagConstraints#weightx,
java.awt.GridBagConstraints#weighty,
java.awt.GridBagConstraints#anchor,
java.awt.GridBagConstraints#fill,
java.awt.GridBagConstraints#insets,
java.awt.GridBagConstraints#ipadx,
java.awt.GridBagConstraints#ipadypublic Object clone()
java.lang.Cloneable