|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo2.webcontainer.syncpeer.GridProcessor
public class GridProcessor
Provides analysis of a Grid for rendering purposes.
This object defines the Grid in terms of two axes, "x" and
"y". The axes are transposed based on whether the origin
property of the Grid is horizontal or vertical. For
horizontally-oriented Grids, the x-axis represents columns
and the y-axis represents rows. For vertically oriented Grids,
the x-axis represents rows and the y-axis represents columns.
Once a GridProcessor has been instantiated, the rendering
GridPeer can make inquiries to it to determine how the
HTML table representing the Grid should be rendered.
Upon instantiation, the dimensions of the grid are calculated, and the
content of each cell within those dimensions is determined. By specifying
an "x" and "y" coordinate to various getXXX() methods, the renderer can
determine what Component exists at a particular coordinate,
how many rows and columns that Component spans, and the index
of the Component within its parent Grid's
children.
This class should not be extended or used by classes outside of the Echo framework.
| Constructor Summary | |
|---|---|
GridProcessor(Grid grid)
Creates a new GridProcessor for the specified
Grid. |
|
| Method Summary | |
|---|---|
int |
getColumnCount()
Returns the number of columns that should be rendered. |
int |
getColumnSpan(int column,
int row)
Returns the column span of the cell at the specified rendered index. |
Extent |
getColumnWidth(int column)
Returns the width of the specified column index |
int |
getComponentIndex(int column,
int row)
Returns the index of the Component that should be rendered
at the specified position within its parent Grid
container. |
Component |
getContent(int column,
int row)
Returns the Component that should be rendered at the
specified position. |
int |
getRowCount()
Returns the number of rows that should be rendered. |
Extent |
getRowHeight(int row)
Returns the height of the specified row index |
int |
getRowSpan(int column,
int row)
Returns the row span of the cell at the specified rendered index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridProcessor(Grid grid)
GridProcessor for the specified
Grid. Creating a new GridProcessor will
cause immediately analyze the Grid which will immediately
consume processor and memory resources. Such operations should be done at
most once per rendering.
grid - the Grid| Method Detail |
|---|
public Component getContent(int column,
int row)
Component that should be rendered at the
specified position.
column - the column indexrow - the row index
Component (may be null)
public int getComponentIndex(int column,
int row)
Component that should be rendered
at the specified position within its parent Grid
container.
column - the column indexrow - the row index
Component within its
container.public int getColumnCount()
public int getRowCount()
public Extent getColumnWidth(int column)
column - the column index
public Extent getRowHeight(int row)
row - the row index
public int getColumnSpan(int column,
int row)
column - the column indexrow - the row index
public int getRowSpan(int column,
int row)
column - the column indexrow - the row index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||