public final class GBC extends java.awt.GridBagConstraints
ABOVE_BASELINE, ABOVE_BASELINE_LEADING, ABOVE_BASELINE_TRAILING, anchor, BASELINE, BASELINE_LEADING, BASELINE_TRAILING, BELOW_BASELINE, BELOW_BASELINE_LEADING, BELOW_BASELINE_TRAILING, BOTH, CENTER, EAST, fill, FIRST_LINE_END, FIRST_LINE_START, gridheight, gridwidth, gridx, gridy, HORIZONTAL, insets, ipadx, ipady, LAST_LINE_END, LAST_LINE_START, LINE_END, LINE_START, NONE, NORTH, NORTHEAST, NORTHWEST, PAGE_END, PAGE_START, RELATIVE, REMAINDER, SOUTH, SOUTHEAST, SOUTHWEST, VERTICAL, weightx, weighty, WEST
Modifier | Constructor and Description |
---|---|
private |
GBC()
Use public static creator functions to create an GBC.
|
Modifier and Type | Method and Description |
---|---|
GBC |
anchor(int a)
Set the anchor of this GBC to a.
|
static GBC |
eol()
Create the constraint for the last elements on a line.
|
static GBC |
eop()
Create the constraint for the last elements on a line and on a paragraph.
|
GBC |
fill()
Try to fill both, horizontal and vertical
|
GBC |
fill(int value)
Set fill to the given value
|
static java.awt.Component |
glue(int x,
int y)
This is a helper to easily create a glue with a minimum default value.
|
GBC |
grid(int gridx,
int gridy)
Sets the constraint's
gridx , gridy . |
GBC |
insets(int insets)
Adds insets to this GBC.
|
GBC |
insets(int left,
int top,
int right,
int bottom)
Adds insets to this GBC.
|
GBC |
span(int gridwidth)
Sets the constraint's
gridwidth . |
GBC |
span(int gridwidth,
int gridheight)
Sets the constraint's
gridwidth , gridheight . |
static GBC |
std()
Create a standard constraint (which is not the last).
|
static GBC |
std(int gridx,
int gridy)
Create a standard constraint with the
gridx , gridy set. |
GBC |
weight(double weightx,
double weighty)
Specifies how to distribute extra horizontal space.
|
private GBC()
public static GBC std()
public static GBC eol()
public static GBC eop()
public GBC fill()
public GBC fill(int value)
value
- The filling value, either NONE, HORIZONTAL, VERTICAL or BOTHpublic GBC anchor(int a)
a
- The new anchor, e.g. GBC.CENTER or GBC.EAST.public GBC insets(int left, int top, int right, int bottom)
left
- The left space of the insetstop
- The top space of the insetsright
- The right space of the insetsbottom
- The bottom space of the insetspublic GBC insets(int insets)
insets
- The insets in all directions.public GBC weight(double weightx, double weighty)
weightx
- Weight in horizontal directionweighty
- Weight in vertical directionpublic static java.awt.Component glue(int x, int y)
x
- If higher than 0, this will be a horizontal glue with x as minimum
horizontal strut.y
- If higher than 0, this will be a vertical glue with y as minimum
vertical strut.public GBC grid(int gridx, int gridy)
gridx
, gridy
.gridx
- cell containing the leading edge of the component's display areagridy
- cell at the top of the component's display areaGridBagConstraints.gridx
,
GridBagConstraints.gridy
public GBC span(int gridwidth, int gridheight)
gridwidth
, gridheight
.gridwidth
- number of cells in a row for the component's display areagridheight
- number of cells in a column for the component's display areaGridBagConstraints.gridwidth
,
GridBagConstraints.gridheight
public GBC span(int gridwidth)
gridwidth
.gridwidth
- number of cells in a row for the component's display areaGridBagConstraints.gridwidth
public static GBC std(int gridx, int gridy)
gridx
, gridy
set.
Is equivalent to std().grid(gridx, gridy)
gridx
- cell containing the leading edge of the component's display areagridy
- cell at the top of the component's display areastd()
,
grid(int, int)
,
GridBagConstraints.gridx
,
GridBagConstraints.gridy