|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pagelayout.Cell pagelayout.CellContainer pagelayout.Row
public class Row
A Row
is a collection of Cell
objects
in which the elements are
arranged sequentially in the horizontal direction from left to right.
Both horizontal and vertical alignment of the elements can be specified. Components and Cell
objects (including Gap
objects which are also cells) that form the columns of a row can be specified in one of the constructors of this class, or may be added to an already constructed row by using the various add
methods of the class CellContainer
, which is the superclass of Row
. Note that by using the
add
or
add
method of the superclass
CellContainer
, the various columns of the
row may be assigned vertical alignments which differ from the alignment
specified in the constructor.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class pagelayout.Cell |
---|
Cell.Constraint |
Field Summary |
---|
Fields inherited from class pagelayout.CellContainer |
---|
cells, halignment, parallelAlignment, valignment |
Fields inherited from class pagelayout.Cell |
---|
BASELINE, BOTTOM, boundSpring, CENTER, constraint, filledSizeX, filledSizeY, fixMaxSize, FOUND_NOTREPLACED, FOUND_REPLACED, halign, JUSTIFIED, LEFT, links, MAX, NEWROW, NO_ALIGNMENT, NOT_FOUND, RIGHT, SKIP, TOP, valign |
Constructor Summary | |
---|---|
Row()
Creates a row with no alignment. |
|
Row(Cell... columnCells)
Creates a row with no alignment. |
|
Row(java.awt.Component... components)
Creates a row with the no alignments. |
|
Row(java.awt.Component[]... components)
Creates a row with the no alignments. |
|
Row(int halignment,
int valignment)
Creates a row with the specified alignments. |
|
Row(int halign,
int valign,
Cell... columnCells)
Creates a row with the specified alignments. |
|
Row(int halign,
int valign,
java.awt.Component... components)
Creates a row with the specified alignments. |
|
Row(int halign,
int valign,
java.awt.Component[]... components)
Creates a row with the specified alignments. |
Method Summary | |
---|---|
BoundSpring |
computeBoundSpring()
Computes the two-dimensional spring associated with the row that results from stacking horizontally the two-dimensional springs associated with each column of the row. |
Cell |
duplicate(ComponentDuplicator c)
|
int |
getBaseline()
Returns the maximum of the baseline of all those cells in this row whose baseline is defined. |
protected static int[] |
getColumnWidths(int x,
int y,
int width,
int height,
BoundSpring boundSpring,
BoundSpring[] columnSprings,
int n)
Computes the widths of the individual columns contained in a row bounded by the specified rectangle. |
protected boolean |
isHorizontal()
Specifies that this CellContainer is a row. |
Column |
newColumn()
Creates an empty column with default alignments. |
Column |
newColumn(Cell... cells)
Creates a column of cells with default alignments. |
Column |
newColumn(java.awt.Component... components)
Creates a column of components with default alignments. |
Column |
newColumn(int halign,
int valign)
Creates an empty column with specified alignments. |
Column |
newColumn(int halign,
int valign,
Cell... cells)
Creates a column of cells with the specified alignments. |
Column |
newColumn(int halign,
int valign,
java.awt.Component... components)
Creates a column of components with the specified alignments. |
protected void |
setBounds(int x,
int y,
int width,
int height)
Arranges the columns of the row within the specified rectangle of the container. |
Methods inherited from class pagelayout.CellContainer |
---|
add, add, add, add, add, add, add, addComponentsToContainer, changeAlignment, clear, getAlignment, getChildAt, getParallelAlignment, layout, limitAlignment, numberOfChildren, replaceChild, toString, xmlserialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Row(int halignment, int valignment)
halignment
- Horizontal alignment specification. May have one of the following four values: Cell.LEFT
, Cell.CENTER
, Cell.RIGHT
, Cell.NO_ALIGNMENT
.valignment
- Vertical alignment specification. May have one of the following four values: Cell.TOP
, Cell.CENTER
, Cell.BOTTOM
, Cell.NO_ALIGNMENT
.public Row()
public Row(Cell... columnCells)
columnCells
- The variable argument list of cells, one for each columns.public Row(int halign, int valign, Cell... columnCells)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.columnCells
- The variable argument list of cells, one for each column.public Row(int halign, int valign, java.awt.Component... components)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.components
- The variable argument list of components, one for each column.public Row(java.awt.Component... components)
components
- The variable argument list of components, one for each column.public Row(java.awt.Component[]... components)
components
- The variable argument list of component arrays, one for each column.public Row(int halign, int valign, java.awt.Component[]... components)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.components
- The variable argument list of component arrays, one for each column.Method Detail |
---|
protected boolean isHorizontal()
CellContainer
is a row.
isHorizontal
in class CellContainer
protected void setBounds(int x, int y, int width, int height)
setBounds
in class Cell
x
- the x-coordinate of the top left of the rectangle.y
- the y-coordinate of the top left of the rectangle.width
- the width of the rectangle.height
- the height of the rectangle.protected static int[] getColumnWidths(int x, int y, int width, int height, BoundSpring boundSpring, BoundSpring[] columnSprings, int n)
CellGrid
to layout the colums within a row when the method setBounds
of the two classes is called.
x
- the x-coordinate of the top left of the rectangle.y
- the y-coordinate of the top left of the rectangle.width
- the width of the rectangle.height
- the height of the rectangle.boundSpring
- the two-dimensional spring associated with the row.columnSprings
- the array of two-dimensional springs associated with the columns of the row.n
- the number of columns in the row.
public BoundSpring computeBoundSpring()
computeBoundSpring
in class CellContainer
public int getBaseline()
getBaseline
in class Cell
ComponentCell.getBaseline()
,
Column.getBaseline()
,
Cell.getBaseline()
public Column newColumn(int halign, int valign, java.awt.Component... components)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.components
- The variable argument list of cells.
public Column newColumn(int halign, int valign, Cell... cells)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.cells
- The variable argument list of cells.
public Column newColumn(java.awt.Component... components)
components
- The variable argument list of cells.
public Column newColumn(Cell... cells)
cells
- The variable argument list of cells.
public Column newColumn()
public Column newColumn(int halign, int valign)
public Cell duplicate(ComponentDuplicator c)
duplicate
in class Cell
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |