|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.forms.factories.CC
public final class CC
A factory for CellConstraints objects.
Examples:
The following cell constraints locate a component in the third
column of the fifth row; column and row span are 1; the component
will be aligned with the column's right-hand side and the row's
bottom.
CC.xy (3, 5); CC.xy (3, 5, CC.RIGHT, CC.BOTTOM); CC.xy (3, 5, "right, bottom"); CC.xyw (3, 5, 1); CC.xyw (3, 5, 1, CC.RIGHT, CC.BOTTOM); CC.xyw (3, 5, 1, "right, bottom"); CC.xywh(3, 5, 1, 1); CC.xywh(3, 5, 1, 1, CC.RIGHT, CC.BOTTOM); CC.xywh(3, 5, 1, 1, "right, bottom");See also the examples in the
FormLayout
class comment.
Field Summary | |
---|---|
static CellConstraints.Alignment |
BOTTOM
|
static CellConstraints.Alignment |
CENTER
|
static CellConstraints.Alignment |
DEFAULT
|
static CellConstraints.Alignment |
FILL
|
static CellConstraints.Alignment |
LEFT
|
static CellConstraints.Alignment |
RIGHT
|
static CellConstraints.Alignment |
TOP
|
Constructor Summary | |
---|---|
CC()
|
Method Summary | |
---|---|
static CellConstraints |
rc(int row,
int col)
Sets row and column origins; sets height and width to 1; uses the default alignments. |
static CellConstraints |
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. |
static CellConstraints |
rc(int row,
int col,
java.lang.String encodedAlignments)
Sets row and column origins; sets height and width to 1; decodes vertical and horizontal alignments from the given string. |
static CellConstraints |
rchw(int row,
int col,
int rowSpan,
int colSpan)
Sets the row, column, height, and width; uses default alignments. |
static CellConstraints |
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. |
static CellConstraints |
rchw(int row,
int col,
int rowSpan,
int colSpan,
java.lang.String encodedAlignments)
Sets the row, column, height, and width; decodes the vertical and horizontal alignments from the given string. |
static CellConstraints |
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. |
static CellConstraints |
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. |
static CellConstraints |
rcw(int row,
int col,
int colSpan,
java.lang.String encodedAlignments)
Sets the row, column, height, and width; decodes the vertical and horizontal alignments from the given string. |
static CellConstraints |
xy(int col,
int row)
Sets column and row origins; sets width and height to 1; uses the default alignments. |
static CellConstraints |
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. |
static CellConstraints |
xy(int col,
int row,
java.lang.String encodedAlignments)
Sets column and row origins; sets width and height to 1; decodes horizontal and vertical alignments from the given string. |
static CellConstraints |
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. |
static CellConstraints |
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. |
static CellConstraints |
xyw(int col,
int row,
int colSpan,
java.lang.String encodedAlignments)
Sets the column, row, width, and height; decodes the horizontal and vertical alignments from the given string. |
static CellConstraints |
xywh(int col,
int row,
int colSpan,
int rowSpan)
Sets the column, row, width, and height; uses default alignments. |
static CellConstraints |
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. |
static CellConstraints |
xywh(int col,
int row,
int colSpan,
int rowSpan,
java.lang.String encodedAlignments)
Sets the column, row, width, and height; decodes the horizontal and vertical alignments from the given string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CellConstraints.Alignment DEFAULT
public static final CellConstraints.Alignment FILL
public static final CellConstraints.Alignment LEFT
public static final CellConstraints.Alignment RIGHT
public static final CellConstraints.Alignment CENTER
public static final CellConstraints.Alignment TOP
public static final CellConstraints.Alignment BOTTOM
Constructor Detail |
---|
public CC()
Method Detail |
---|
public static CellConstraints xy(int col, int row)
Examples:
CC.xy(1, 1); CC.xy(1, 3);
col
- the new column indexrow
- the new row index
public static CellConstraints xy(int col, int row, java.lang.String encodedAlignments)
Examples:
CC.xy(1, 3, "left, bottom"); CC.xy(1, 3, "l, b"); CC.xy(1, 3, "center, fill"); CC.xy(1, 3, "c, f");
col
- the new column indexrow
- the new row indexencodedAlignments
- describes the horizontal and vertical alignments
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints xy(int col, int row, CellConstraints.Alignment colAlign, CellConstraints.Alignment rowAlign)
Examples:
CC.xy(1, 3, CellConstraints.LEFT, CellConstraints.BOTTOM); CC.xy(1, 3, CellConstraints.CENTER, CellConstraints.FILL);
col
- the new column indexrow
- the new row indexcolAlign
- horizontal component alignmentrowAlign
- vertical component alignment
public static CellConstraints xyw(int col, int row, int colSpan)
Examples:
CC.xyw(1, 3, 7); CC.xyw(1, 3, 2);
col
- the new column indexrow
- the new row indexcolSpan
- the column span or grid width
public static CellConstraints xyw(int col, int row, int colSpan, java.lang.String encodedAlignments)
Examples:
CC.xyw(1, 3, 7, "left, bottom"); CC.xyw(1, 3, 7, "l, b"); CC.xyw(1, 3, 2, "center, fill"); CC.xyw(1, 3, 2, "c, f");
col
- the new column indexrow
- the new row indexcolSpan
- the column span or grid widthencodedAlignments
- describes the horizontal and vertical alignments
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints xyw(int col, int row, int colSpan, CellConstraints.Alignment colAlign, CellConstraints.Alignment rowAlign)
Examples:
CC.xyw(1, 3, 2, CellConstraints.LEFT, CellConstraints.BOTTOM); CC.xyw(1, 3, 7, CellConstraints.CENTER, CellConstraints.FILL);
col
- the new column indexrow
- the new row indexcolSpan
- the column span or grid widthcolAlign
- horizontal component alignmentrowAlign
- vertical component alignment
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints xywh(int col, int row, int colSpan, int rowSpan)
Examples:
CC.xywh(1, 3, 2, 1); CC.xywh(1, 3, 7, 3);
col
- the new column indexrow
- the new row indexcolSpan
- the column span or grid widthrowSpan
- the row span or grid height
public static CellConstraints xywh(int col, int row, int colSpan, int rowSpan, java.lang.String encodedAlignments)
Examples:
CC.xywh(1, 3, 2, 1, "left, bottom"); CC.xywh(1, 3, 2, 1, "l, b"); CC.xywh(1, 3, 7, 3, "center, fill"); CC.xywh(1, 3, 7, 3, "c, f");
col
- the new column indexrow
- the new row indexcolSpan
- the column span or grid widthrowSpan
- the row span or grid heightencodedAlignments
- describes the horizontal and vertical alignments
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints xywh(int col, int row, int colSpan, int rowSpan, CellConstraints.Alignment colAlign, CellConstraints.Alignment rowAlign)
Examples:
CC.xywh(1, 3, 2, 1, CellConstraints.LEFT, CellConstraints.BOTTOM); CC.xywh(1, 3, 7, 3, CellConstraints.CENTER, CellConstraints.FILL);
col
- the new column indexrow
- the new row indexcolSpan
- the column span or grid widthrowSpan
- the row span or grid heightcolAlign
- horizontal component alignmentrowAlign
- vertical component alignment
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints rc(int row, int col)
Examples:
CC.rc(1, 1); CC.rc(3, 1);
row
- the new row indexcol
- the new column index
public static CellConstraints rc(int row, int col, java.lang.String encodedAlignments)
Examples:
CC.rc(3, 1, "bottom, left"); CC.rc(3, 1, "b, l"); CC.rc(3, 1, "fill, center"); CC.rc(3, 1, "f, c");
row
- the new row indexcol
- the new column indexencodedAlignments
- describes the vertical and horizontal alignments
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints rc(int row, int col, CellConstraints.Alignment rowAlign, CellConstraints.Alignment colAlign)
Examples:
CC.rc(3, 1, CellConstraints.BOTTOM, CellConstraints.LEFT); CC.rc(3, 1, CellConstraints.FILL, CellConstraints.CENTER);
row
- the new row indexcol
- the new column indexrowAlign
- vertical component alignmentcolAlign
- horizontal component alignment
public static CellConstraints rcw(int row, int col, int colSpan)
Examples:
CC.rcw(3, 1, 7); CC.rcw(3, 1, 2);
row
- the new row indexcol
- the new column indexcolSpan
- the column span or grid width
public static CellConstraints rcw(int row, int col, int colSpan, java.lang.String encodedAlignments)
Examples:
CC.rcw(3, 1, 7, "bottom, left"); CC.rcw(3, 1, 7, "b, l"); CC.rcw(3, 1, 2, "fill, center"); CC.rcw(3, 1, 2, "f, c");
row
- the new row indexcol
- the new column indexcolSpan
- the column span or grid widthencodedAlignments
- describes the vertical and horizontal alignments
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints rcw(int row, int col, int colSpan, CellConstraints.Alignment rowAlign, CellConstraints.Alignment colAlign)
Examples:
CC.rcw(3, 1, 2, CellConstraints.BOTTOM, CellConstraints.LEFT); CC.rcw(3, 1, 7, CellConstraints.FILL, CellConstraints.CENTER);
row
- the new row indexcol
- the new column indexcolSpan
- the column span or grid widthrowAlign
- vertical component alignmentcolAlign
- horizontal component alignment
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints rchw(int row, int col, int rowSpan, int colSpan)
Examples:
CC.rchw(1, 3, 2, 1); CC.rchw(1, 3, 7, 3);
row
- the new row indexcol
- the new column indexrowSpan
- the row span or grid heightcolSpan
- the column span or grid width
public static CellConstraints rchw(int row, int col, int rowSpan, int colSpan, java.lang.String encodedAlignments)
Examples:
CC.rchw(3, 1, 1, 2, "bottom, left"); CC.rchw(3, 1, 1, 2, "b, l"); CC.rchw(3, 1, 3, 7, "fill, center"); CC.rchw(3, 1, 3, 7, "f, c");
row
- the new row indexcol
- the new column indexrowSpan
- the row span or grid heightcolSpan
- the column span or grid widthencodedAlignments
- describes the vertical and horizontal alignments
java.lang.IllegalArgumentException
- if an alignment orientation is invalidpublic static CellConstraints rchw(int row, int col, int rowSpan, int colSpan, CellConstraints.Alignment rowAlign, CellConstraints.Alignment colAlign)
Examples:
CC.rchw(3, 1, 1, 2, CellConstraints.BOTTOM, CellConstraints.LEFT); CC.rchw(3, 1, 3, 7, CellConstraints.FILL, CellConstraints.CENTER);
row
- the new row indexcol
- the new column indexrowSpan
- the row span or grid heightcolSpan
- the column span or grid widthrowAlign
- vertical component alignmentcolAlign
- horizontal component alignment
java.lang.IllegalArgumentException
- if an alignment orientation is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |