|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpagelayout.GridRows
public class GridRows
GridRows is a utility class that may make it easier to create
a grid using GridRow.
It just provides some syntactic sugar so the code for using
GridRow
may appear to be more compact to some users.
Here is the alternate code for Example10
that replaces the lines that create the seven rows for the grid and then
the grid itself. This is available as Example11.
GridRows rows=new GridRows();
// First row
rows.newRow().add(lastName,lastNameE,firstName,firstNameE);
// Second row
rows.newRow().add(phone,phoneE)
.add(new Row(NO_ALIGNMENT,CENTER,email,emailE)).span(2);
// Third row
rows.newRow().add(address1,address1E).span(3);
// Fourth row
rows.newRow().add(address2,address2E).span(3);
// Fifth row
rows.newRow().add(city,cityE);
// Sixth row
rows.newRow().add(state,stateE,postal,postalE);
// Seventh row
rows.newRow().add(county,countyE);
CellGrid grid=rows.createCellGrid();
| Constructor Summary | |
|---|---|
GridRows()
Creates instance of this class. |
|
| Method Summary | |
|---|---|
CellGrid |
createCellGrid()
Creates a CellGrid object from the
rows created by calling the newRow
method of this object. |
GridRow |
getCurrentRow()
Returns the current row represented by a GridRow object. |
GridRow |
newRow()
Creates and returns a new GridRow object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridRows()
| Method Detail |
|---|
public GridRow newRow()
GridRow object.
This row is added to the existing rows.
GridRow.public GridRow getCurrentRow()
GridRow object.
public CellGrid createCellGrid()
CellGrid object from the
rows created by calling the newRow
method of this object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||