Fields Summary |
---|
public static final int | RELATIVESpecifies that this component is the next-to-last component in its
column or row (gridwidth , gridheight ),
or that this component be placed next to the previously added
component (gridx , gridy ). |
public static final int | REMAINDERSpecifies that this component is the
last component in its column or row. |
public static final int | NONEDo not resize the component. |
public static final int | BOTHResize the component both horizontally and vertically. |
public static final int | HORIZONTALResize the component horizontally but not vertically. |
public static final int | VERTICALResize the component vertically but not horizontally. |
public static final int | CENTERPut the component in the center of its display area. |
public static final int | NORTHPut the component at the top of its display area,
centered horizontally. |
public static final int | NORTHEASTPut the component at the top-right corner of its display area. |
public static final int | EASTPut the component on the right side of its display area,
centered vertically. |
public static final int | SOUTHEASTPut the component at the bottom-right corner of its display area. |
public static final int | SOUTHPut the component at the bottom of its display area, centered
horizontally. |
public static final int | SOUTHWESTPut the component at the bottom-left corner of its display area. |
public static final int | WESTPut the component on the left side of its display area,
centered vertically. |
public static final int | NORTHWESTPut the component at the top-left corner of its display area. |
public static final int | PAGE_STARTPlace the component centered along the edge of its display area
associated with the start of a page for the current
ComponentOrienation . Equal to NORTH for horizontal
orientations. |
public static final int | PAGE_ENDPlace the component centered along the edge of its display area
associated with the end of a page for the current
ComponentOrienation . Equal to SOUTH for horizontal
orientations. |
public static final int | LINE_STARTPlace the component centered along the edge of its display area where
lines of text would normally begin for the current
ComponentOrienation . Equal to WEST for horizontal,
left-to-right orientations and EAST for horizontal, right-to-left
orientations. |
public static final int | LINE_ENDPlace the component centered along the edge of its display area where
lines of text would normally end for the current
ComponentOrienation . Equal to EAST for horizontal,
left-to-right orientations and WEST for horizontal, right-to-left
orientations. |
public static final int | FIRST_LINE_STARTPlace the component in the corner of its display area where
the first line of text on a page would normally begin for the current
ComponentOrienation . Equal to NORTHWEST for horizontal,
left-to-right orientations and NORTHEAST for horizontal, right-to-left
orientations. |
public static final int | FIRST_LINE_ENDPlace the component in the corner of its display area where
the first line of text on a page would normally end for the current
ComponentOrienation . Equal to NORTHEAST for horizontal,
left-to-right orientations and NORTHWEST for horizontal, right-to-left
orientations. |
public static final int | LAST_LINE_STARTPlace the component in the corner of its display area where
the last line of text on a page would normally start for the current
ComponentOrienation . Equal to SOUTHWEST for horizontal,
left-to-right orientations and SOUTHEAST for horizontal, right-to-left
orientations. |
public static final int | LAST_LINE_ENDPlace the component in the corner of its display area where
the last line of text on a page would normally end for the current
ComponentOrienation . Equal to SOUTHEAST for horizontal,
left-to-right orientations and SOUTHWEST for horizontal, right-to-left
orientations. |
public int | gridxSpecifies the cell containing the leading edge of the component's
display area, where the first cell in a row has 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. |
public int | gridySpecifies the cell at the top of the component's display area,
where the topmost cell has 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. |
public int | gridwidthSpecifies the number of cells in a row for the component's
display area.
Use REMAINDER to specify that the component's
display area will be from gridx to the last
cell in the row.
Use RELATIVE to specify that the component's
display area will be from gridx to the next
to the last one in its row.
gridwidth should be non-negative and the default
value is 1. |
public int | gridheightSpecifies the number of cells in a column for the component's
display area.
Use REMAINDER to specify that the component's
display area will be from gridy to the last
cell in the column.
Use RELATIVE to specify that the component's
display area will be from gridy to the next
to the last one in its column.
gridheight should be a non-negative value and the
default value is 1. |
public double | weightxSpecifies how to distribute extra horizontal space.
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. |
public double | weightySpecifies how to distribute extra vertical space.
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. |
public int | anchorThis field is used when the component is smaller than its display
area. It determines where, within the display area, to place the
component.
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 . |
public int | fillThis field is used when the component's display area is larger
than the component's requested size. It determines whether to
resize the component, and if so, how.
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 . |
public Insets | insetsThis field specifies the external padding of the component, the
minimum amount of space between the component and the edges of its
display area.
The default value is new Insets(0, 0, 0, 0) . |
public int | ipadxThis field specifies the internal padding of the component, how much
space to add to the minimum width of the component. The width of
the component is at least its minimum width plus
ipadx pixels.
The default value is 0 . |
public int | ipadyThis field specifies the internal padding, that is, how much
space to add to the minimum height of the component. The height of
the component is at least its minimum height plus
ipady pixels.
The default value is 0. |
int | tempXTemporary place holder for the x coordinate. |
int | tempYTemporary place holder for the y coordinate. |
int | tempWidthTemporary place holder for the Width of the component. |
int | tempHeightTemporary place holder for the Height of the component. |
int | minWidthThe minimum width of the component. It is used to calculate
ipady , where the default will be 0. |
int | minHeightThe minimum height of the component. It is used to calculate
ipadx , where the default will be 0. |
private static final long | serialVersionUID |