|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pagelayout.Cell pagelayout.CellContainer pagelayout.Column
public class Column
A Column
is a collection of Cell
objects
in which the elements are
arranged sequentially in the vertical direction from top to bottom.
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 rows of a column can be specified in one of the constructors of this class, or may be added to an already constructed column by using the various add
methods of the class CellContainer
which is the superclass of Column
. Note that by using the
add
or
add
method of the superclass
CellContainer
, the various rows of the
column may be assigned horizontal 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 | |
---|---|
Column()
Creates a column with no alignment. |
|
Column(Cell... cellrows)
Creates a column with no alignment. |
|
Column(java.awt.Component... components)
Creates a column with no alignment. |
|
Column(java.awt.Component[]... rows)
Creates a column with no alignment. |
|
Column(int halignment,
int valignment)
Creates a column with the specified alignments. |
|
Column(int halign,
int valign,
Cell... cellrows)
Creates a column with the specified alignments. |
|
Column(int halign,
int valign,
java.awt.Component... components)
Creates a column with the specified alignments. |
|
Column(int halign,
int valign,
java.awt.Component[]... rows)
Creates a column with the specified alignments. |
Method Summary | |
---|---|
BoundSpring |
computeBoundSpring()
Computes the two-dimensional spring associated with the column that results from stacking vertically the two-dimensional springs associated with each row of the column. |
Cell |
duplicate(ComponentDuplicator c)
|
int |
getBaseline()
Returns the baseline of the topmost cell in this column. |
protected static int[] |
getRowHeights(int x,
int y,
int width,
int height,
BoundSpring boundSpring,
BoundSpring[] rowSprings,
int n)
Computes the heights of the individual rows contained in a column bounded by the specified rectangle. |
protected boolean |
isHorizontal()
Specifies that this CellContainer is a column. |
Row |
newRow()
Creates an empty row with the default alignments. |
Row |
newRow(Cell... cells)
Creates a row of cells with default alignments. |
Row |
newRow(java.awt.Component... components)
Creates a row of components with default alignments. |
Row |
newRow(int halign,
int valign)
Creates an empty row with the specified alignments. |
Row |
newRow(int halign,
int valign,
Cell... cells)
Creates a row of cells with the specified alignments. |
Row |
newRow(int halign,
int valign,
java.awt.Component... components)
Creates a row of components with the specified alignments. |
protected void |
setBounds(int x,
int y,
int width,
int height)
Arranges the rows of the column within the specified rectangle of the container. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class pagelayout.CellContainer |
---|
add, add, add, add, add, add, add, addComponentsToContainer, changeAlignment, clear, getAlignment, getChildAt, getParallelAlignment, layout, limitAlignment, numberOfChildren, replaceChild, xmlserialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Column(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 Column()
public Column(Cell... cellrows)
cellrows
- The variable argument list of cells, one for each row.public Column(int halign, int valign, Cell... cellrows)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.cellrows
- The variable argument list of cells, one for each row.public Column(java.awt.Component... components)
components
- The variable argument list of components, one for each row.public Column(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 row.public Column(int halign, int valign, java.awt.Component[]... rows)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.rows
- The variable argument list of component arrays, one for each row.public Column(java.awt.Component[]... rows)
rows
- The variable argument list of component arrays, one for each row.Method Detail |
---|
protected boolean isHorizontal()
CellContainer
is a column.
isHorizontal
in class CellContainer
public java.lang.String toString()
CellContainer
toString
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[] getRowHeights(int x, int y, int width, int height, BoundSpring boundSpring, BoundSpring[] rowSprings, int n)
CellGrid
to layout the rows of a column 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 column.rowSprings
- the array of two-dimensional springs associated with the rows of the column.n
- the number of rows in the column.
public BoundSpring computeBoundSpring()
computeBoundSpring
in class CellContainer
public int getBaseline()
getBaseline
in class Cell
ComponentCell.getBaseline()
,
Row.getBaseline()
,
Cell.getBaseline()
public Row newRow(int halign, int valign, java.awt.Component... components)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.components
- The variable argument list of cells.
public Row newRow(int halign, int valign, Cell... cells)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.cells
- The variable argument list of cells.
public Row newRow(java.awt.Component... components)
components
- The variable argument list of cells.
public Row newRow(Cell... cells)
cells
- The variable argument list of cells.
public Row newRow(int halign, int valign)
halign
- Horizontal alignment specification.valign
- Vertical alignment specification.
public Row newRow()
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 |