public static class FormBuilder.ComponentAdder extends Object
Modifier and Type | Field and Description |
---|---|
protected FormBuilder |
builder |
Modifier and Type | Method and Description |
---|---|
protected FormBuilder |
add(CellConstraints constraints) |
FormBuilder |
at(CellConstraints constraints)
Sets the given cell constraints.
|
FormBuilder.ComponentAdder |
labelFor(Component c) |
FormBuilder |
rc(int row,
int col)
Sets row and column origins; sets height and width to 1;
uses the default alignments.
|
FormBuilder |
rc(int row,
int col,
CellConstraints.Alignment rowAlign,
CellConstraints.Alignment colAlign)
Sets the row and column origins; sets width and height to 1;
set horizontal and vertical alignment using the specified objects.
|
FormBuilder |
rc(int row,
int col,
String encodedAlignments)
Sets row and column origins; sets height and width to 1;
decodes vertical and horizontal alignments from the given string.
|
FormBuilder |
rchw(int row,
int col,
int rowSpan,
int colSpan)
Sets the row, column, height, and width; uses default alignments.
|
FormBuilder |
rchw(int row,
int col,
int rowSpan,
int colSpan,
CellConstraints.Alignment rowAlign,
CellConstraints.Alignment colAlign)
Sets the row, column, height, and width; sets the vertical and
horizontal alignment using the specified alignment objects.
|
FormBuilder |
rchw(int row,
int col,
int rowSpan,
int colSpan,
String encodedAlignments)
Sets the row, column, height, and width;
decodes the vertical and horizontal alignments from the given string.
|
FormBuilder |
rcw(int row,
int col,
int colSpan)
Sets the row, column, height, and width; uses a height (row span) of 1
and the vertical and horizontal default alignments.
|
FormBuilder |
rcw(int row,
int col,
int colSpan,
CellConstraints.Alignment rowAlign,
CellConstraints.Alignment colAlign)
Sets the row, column, height, and width; sets the vertical
and horizontal alignment using the specified alignment objects.
|
FormBuilder |
rcw(int row,
int col,
int colSpan,
String encodedAlignments)
Sets the row, column, height, and width;
decodes the vertical and horizontal alignments from the given string.
|
FormBuilder |
xy(int col,
int row)
Sets column and row origins; sets width and height to 1;
uses the default alignments.
|
FormBuilder |
xy(int col,
int row,
CellConstraints.Alignment colAlign,
CellConstraints.Alignment rowAlign)
Sets the column and row origins; sets width and height to 1;
set horizontal and vertical alignment using the specified objects.
|
FormBuilder |
xy(int col,
int row,
String encodedAlignments)
Sets column and row origins; sets width and height to 1;
decodes horizontal and vertical alignments from the given string.
|
FormBuilder |
xyw(int col,
int row,
int colSpan)
Sets the column, row, width, and height; uses a height (row span) of 1
and the horizontal and vertical default alignments.
|
FormBuilder |
xyw(int col,
int row,
int colSpan,
CellConstraints.Alignment colAlign,
CellConstraints.Alignment rowAlign)
Sets the column, row, width, and height; sets the horizontal
and vertical alignment using the specified alignment objects.
|
FormBuilder |
xyw(int col,
int row,
int colSpan,
String encodedAlignments)
Sets the column, row, width, and height;
decodes the horizontal and vertical alignments from the given string.
|
FormBuilder |
xywh(int col,
int row,
int colSpan,
int rowSpan)
Sets the column, row, width, and height; uses default alignments.
|
FormBuilder |
xywh(int col,
int row,
int colSpan,
int rowSpan,
CellConstraints.Alignment colAlign,
CellConstraints.Alignment rowAlign)
Sets the column, row, width, and height; sets the horizontal
and vertical alignment using the specified alignment objects.
|
FormBuilder |
xywh(int col,
int row,
int colSpan,
int rowSpan,
String encodedAlignments)
Sets the column, row, width, and height;
decodes the horizontal and vertical alignments from the given string.
|
protected final FormBuilder builder
public final FormBuilder.ComponentAdder labelFor(Component c)
public final FormBuilder at(CellConstraints constraints)
Examples:
.add(aComponent).at(cellConstraints)
constraints
- specifies where an how to place a componentpublic final FormBuilder xy(int col, int row)
Examples:
.add(aComponent).xy(1, 1) .add(aComponent).xy(1, 3)
col
- the column indexrow
- the row indexpublic final FormBuilder xy(int col, int row, String encodedAlignments)
Examples:
.add(aComponent).xy(1, 3, "left, bottom"); .add(aComponent).xy(1, 3, "l, b"); .add(aComponent).xy(1, 3, "center, fill"); .add(aComponent).xy(1, 3, "c, f");
col
- the column indexrow
- the row indexencodedAlignments
- describes the horizontal and vertical alignmentsIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder xy(int col, int row, CellConstraints.Alignment colAlign, CellConstraints.Alignment rowAlign)
Examples:
.add(aComponent).xy(1, 3, CellConstraints.LEFT, CellConstraints.BOTTOM); .add(aComponent).xy(1, 3, CellConstraints.CENTER, CellConstraints.FILL);
col
- the column indexrow
- the row indexcolAlign
- horizontal component alignmentrowAlign
- vertical component alignmentpublic final FormBuilder xyw(int col, int row, int colSpan)
Examples:
.add(aComponent).xyw(1, 3, 7); .add(aComponent).xyw(1, 3, 2);
col
- the column indexrow
- the row indexcolSpan
- the column span or grid widthpublic final FormBuilder xyw(int col, int row, int colSpan, String encodedAlignments)
Examples:
.add(aComponent).xyw(1, 3, 7, "left, bottom") .add(aComponent).xyw(1, 3, 7, "l, b"); .add(aComponent).xyw(1, 3, 2, "center, fill"); .add(aComponent).xyw(1, 3, 2, "c, f");
col
- the column indexrow
- the row indexcolSpan
- the column span or grid widthencodedAlignments
- describes the horizontal and vertical alignmentsIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder xyw(int col, int row, int colSpan, CellConstraints.Alignment colAlign, CellConstraints.Alignment rowAlign)
Examples:
.add(aComponent).xyw(1, 3, 2, CellConstraints.LEFT, CellConstraints.BOTTOM); .add(aComponent).xyw(1, 3, 7, CellConstraints.CENTER, CellConstraints.FILL);
col
- the column indexrow
- the row indexcolSpan
- the column span or grid widthcolAlign
- horizontal component alignmentrowAlign
- vertical component alignmentIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder xywh(int col, int row, int colSpan, int rowSpan)
Examples:
.add(aComponent).xywh(1, 3, 2, 1); .add(aComponent).xywh(1, 3, 7, 3);
col
- the column indexrow
- the row indexcolSpan
- the column span or grid widthrowSpan
- the row span or grid heightpublic final FormBuilder xywh(int col, int row, int colSpan, int rowSpan, String encodedAlignments)
Examples:
.add(aComponent).xywh(1, 3, 2, 1, "left, bottom"); .add(aComponent).xywh(1, 3, 2, 1, "l, b"); .add(aComponent).xywh(1, 3, 7, 3, "center, fill"); .add(aComponent).xywh(1, 3, 7, 3, "c, f");
col
- the column indexrow
- the row indexcolSpan
- the column span or grid widthrowSpan
- the row span or grid heightencodedAlignments
- describes the horizontal and vertical alignmentsIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder xywh(int col, int row, int colSpan, int rowSpan, CellConstraints.Alignment colAlign, CellConstraints.Alignment rowAlign)
Examples:
.add(aComponent).xywh(1, 3, 2, 1, CellConstraints.LEFT, CellConstraints.BOTTOM); .add(aComponent).xywh(1, 3, 7, 3, CellConstraints.CENTER, CellConstraints.FILL);
col
- the column indexrow
- the row indexcolSpan
- the column span or grid widthrowSpan
- the row span or grid heightcolAlign
- horizontal component alignmentrowAlign
- vertical component alignmentIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder rc(int row, int col)
Examples:
.add(aComponent).rc(1, 1) .add(aComponent).rc(3, 1)
row
- the row indexcol
- the column indexpublic final FormBuilder rc(int row, int col, String encodedAlignments)
Examples:
.add(aComponent).rc(3, 1, "bottom, left") .add(aComponent).rc(3, 1, "b, l") .add(aComponent).rc(3, 1, "fill, center") .add(aComponent).rc(3, 1, "f, c")
row
- the row indexcol
- the column indexencodedAlignments
- describes the vertical and horizontal alignmentsIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder rc(int row, int col, CellConstraints.Alignment rowAlign, CellConstraints.Alignment colAlign)
Examples:
.add(aComponent).rc(3, 1, CellConstraints.BOTTOM, CellConstraints.LEFT); .add(aComponent).rc(3, 1, CellConstraints.FILL, CellConstraints.CENTER);
row
- the row indexcol
- the column indexrowAlign
- vertical component alignmentcolAlign
- horizontal component alignmentpublic final FormBuilder rcw(int row, int col, int colSpan)
Examples:
.add(aComponent).rcw(3, 1, 7); .add(aComponent).rcw(3, 1, 2);
row
- the row indexcol
- the column indexcolSpan
- the column span or grid widthpublic final FormBuilder rcw(int row, int col, int colSpan, String encodedAlignments)
Examples:
.add(aComponent).rcw(3, 1, 7, "bottom, left"); .add(aComponent).rcw(3, 1, 7, "b, l"); .add(aComponent).rcw(3, 1, 2, "fill, center"); .add(aComponent).rcw(3, 1, 2, "f, c");
row
- the row indexcol
- the column indexcolSpan
- the column span or grid widthencodedAlignments
- describes the vertical and horizontal alignmentsIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder rcw(int row, int col, int colSpan, CellConstraints.Alignment rowAlign, CellConstraints.Alignment colAlign)
Examples:
.add(aComponent).rcw(3, 1, 2, CellConstraints.BOTTOM, CellConstraints.LEFT); .add(aComponent).rcw(3, 1, 7, CellConstraints.FILL, CellConstraints.CENTER);
row
- the row indexcol
- the column indexcolSpan
- the column span or grid widthrowAlign
- vertical component alignmentcolAlign
- horizontal component alignmentIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder rchw(int row, int col, int rowSpan, int colSpan)
Examples:
.add(aComponent).rchw(1, 3, 2, 1); .add(aComponent).rchw(1, 3, 7, 3);
row
- the row indexcol
- the column indexrowSpan
- the row span or grid heightcolSpan
- the column span or grid widthpublic final FormBuilder rchw(int row, int col, int rowSpan, int colSpan, String encodedAlignments)
Examples:
.add(aComponent).rchw(3, 1, 1, 2, "bottom, left"); .add(aComponent).rchw(3, 1, 1, 2, "b, l"); .add(aComponent).rchw(3, 1, 3, 7, "fill, center"); .add(aComponent).rchw(3, 1, 3, 7, "f, c");
row
- the row indexcol
- the column indexrowSpan
- the row span or grid heightcolSpan
- the column span or grid widthencodedAlignments
- describes the vertical and horizontal alignmentsIllegalArgumentException
- if an alignment orientation is invalidpublic final FormBuilder rchw(int row, int col, int rowSpan, int colSpan, CellConstraints.Alignment rowAlign, CellConstraints.Alignment colAlign)
Examples:
.add(aComponent).rchw(3, 1, 1, 2, CellConstraints.BOTTOM, CellConstraints.LEFT); .add(aComponent).rchw(3, 1, 3, 7, CellConstraints.FILL, CellConstraints.CENTER);
row
- the row indexcol
- the column indexrowSpan
- the row span or grid heightcolSpan
- the column span or grid widthrowAlign
- vertical component alignmentcolAlign
- horizontal component alignmentIllegalArgumentException
- if an alignment orientation is invalidprotected FormBuilder add(CellConstraints constraints)
Copyright © 2002-2015 JGoodies Software GmbH. All Rights Reserved.