|
NextApp Echo App Container 1.0.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echoservlet.ui.GridRenderingModel
A utility class used when rendering Grid
components.
Nested Class Summary | |
private static class |
GridRenderingModel.FlowOrderComparator
A comparator used to determine the order in which cells will "flow" within a grid to consume empty space. |
private static class |
GridRenderingModel.OriginCell
An object used to describe the origin of (top-left coordinate) of a grid cell. |
private static class |
GridRenderingModel.PointerCell
An object used to describe a grid coordinate that is occupied by a multi-row and/or multi-column cell, but is not the origin (top-left cell) of that cell. |
Field Summary | |
static int |
CELL_TYPE_EMPTY
|
static int |
CELL_TYPE_ORIGIN
|
static int |
CELL_TYPE_POINTER
|
private java.lang.Object[][] |
cellArray
|
private int |
columnCount
|
private int[] |
columnMapping
|
private int[] |
columnWidths
|
private boolean |
columnWidthsUsePercentUnits
|
private static GridRenderingModel.FlowOrderComparator |
FLOW_ORDER_COMPARATOR
|
private nextapp.echo.Grid |
grid
|
private int |
rowCount
|
private int[] |
rowHeights
|
private boolean |
rowHeightsUsePercentUnits
|
private int[] |
rowMapping
|
private boolean[] |
visibleColumns
|
private boolean[] |
visibleRows
|
Constructor Summary | |
GridRenderingModel(nextapp.echo.Grid grid)
Creates a GridRenderingModel for the specified Grid . |
Method Summary | |
private void |
flowCell(nextapp.echo.Grid.Cell cell)
Grows cells that have a flow property set. |
nextapp.echo.Grid.Cell |
getCell(int column,
int row)
Returns the Grid.Cell at the specified coordinate. |
int |
getCellHeight()
Returns the height of the specified cell in pixels, or EchoConstants.UNDEFINED_SIZE if it cannot be determined. |
int |
getCellHeight(int column,
int row)
Returns the height of the specified cell, or EchoConstants.UNDEFINED_SIZE if it cannot be determined. |
int |
getCellType(int column,
int row)
Returns the cell type at the specified coordinate. |
int |
getCellWidth(int column,
int row)
Returns the width of the specified cell, or EchoConstants.UNDEFINED_SIZE if it cannot be determined. |
int |
getColumnCount()
Returns the number of columns in the rendered version of the grid. |
int |
getColumnSpan(int column,
int row)
Returns the column span of the cell at the specified coordinates in the rendered version of the grid. |
int |
getColumnWidth(int column)
Returns the rendered width of the given column. |
int |
getRowCount()
Returns the number of rows in the rendered version of the grid. |
int |
getRowHeight(int row)
Returns the rendered height of the given row. |
int |
getRowSpan(int column,
int row)
Returns the row span of the cell at the specified coordinates in the rendered version of the grid. |
private void |
reduceColumns()
Removes empty columns that are spanned across in every row of the grid. |
private void |
reduceRows()
Removes empty rows that are spanned across in every column of the grid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final GridRenderingModel.FlowOrderComparator FLOW_ORDER_COMPARATOR
public static final int CELL_TYPE_EMPTY
public static final int CELL_TYPE_ORIGIN
public static final int CELL_TYPE_POINTER
private java.lang.Object[][] cellArray
private boolean[] visibleRows
private boolean[] visibleColumns
private int[] rowMapping
private int[] rowHeights
private int[] columnMapping
private int[] columnWidths
private int columnCount
private int rowCount
private nextapp.echo.Grid grid
private boolean columnWidthsUsePercentUnits
private boolean rowHeightsUsePercentUnits
Constructor Detail |
public GridRenderingModel(nextapp.echo.Grid grid)
GridRenderingModel
for the specified Grid
.
grid
- The Grid
to be rendered.Method Detail |
private void flowCell(nextapp.echo.Grid.Cell cell)
cell
- The cell to flow. This cell must be visible.public nextapp.echo.Grid.Cell getCell(int column, int row)
Grid.Cell
at the specified coordinate.
The cells position and row and column spans may have changed if
the cell flow-filled up or to the left and/or rows and columns of
the grid were reduced.
public int getCellHeight()
EchoConstants.UNDEFINED_SIZE
if it cannot be determined.
public int getCellType(int column, int row)
CELL_TYPE_EMPTY
No cell exists at the coordinate, a
filler cell should be rendered.CELL_TYPE_ORIGIN
A cell's origin is at the specified
coordinate. The cell should be rendered here.CELL_TYPE_POINTER
A cell occupies this space, but this
is not the coordinate of its origin. NOTHING should be rendered.
public int getCellHeight(int column, int row)
EchoConstants.UNDEFINED_SIZE
if it cannot be determined.
Will throw IllegalArgumentException if OriginCell does not
exist at specified coordinate.
public int getCellWidth(int column, int row)
EchoConstants.UNDEFINED_SIZE
if it cannot be determined.
Will throw IllegalArgumentException if OriginCell does not
exist at specified coordinate.
public int getColumnCount()
public int getColumnSpan(int column, int row)
public int getColumnWidth(int column)
public int getRowCount()
public int getRowHeight(int row)
public int getRowSpan(int column, int row)
private void reduceColumns()
private void reduceRows()
|
NextApp Echo App Container 1.0.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |