|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.widgetideas.table.client.TableBulkRenderer
public abstract class TableBulkRenderer
Enables bulk rendering of tables. Each subclass that needs special handling for bulk rendering should have its own bulk renderer.
Nested Class Summary | |
---|---|
static class |
TableBulkRenderer.CellRenderer
Controls how each cell is rendered. |
protected class |
TableBulkRenderer.RenderingOptions
Convenience class used to specify rendering options for the table. |
static class |
TableBulkRenderer.StringCellRenderer
Controls how each cell is rendered. |
Field Summary | |
---|---|
static int |
MAX_TIME
Maximum time allowable to create the table string. |
static int |
ROWS_PER_TIME_CHECK
How many rows should be processed before time is checked and the event loop is potentially flushed. |
static int |
TIME_SLICE
Time slice in milliseconds that the construction of the string can take before flushing the event cue. |
Constructor Summary | |
---|---|
TableBulkRenderer(HTMLTable table)
Constructor for the bulk renderer. |
|
TableBulkRenderer(HTMLTable table,
TableBulkRenderer.CellRenderer renderer)
Constructor for the bulk renderer. |
Method Summary | |
---|---|
TableBulkRenderer.CellRenderer |
getCellRenderer()
Gets the cell renderer. |
protected HTMLTable |
getTable()
|
void |
renderRows(java.util.Iterator<java.util.Iterator<java.lang.Object>> rows,
RendererCallback callback)
Removes all rows in the current table replaces them with the roews supplied by the iterator. |
protected void |
renderRows(java.util.Iterator<java.util.Iterator<java.lang.Object>> rows,
TableBulkRenderer.RenderingOptions options)
Work horse protected rendering method. |
void |
renderRows(java.util.List<java.util.List<java.lang.Object>> rows,
RendererCallback callback)
Removes all rows in the current table replaces them with the list of rows provided. |
void |
renderRows(TableModel<?> tableModel,
int startRow,
int numRows,
RendererCallback callback)
Removes all rows in the current table replaces them with the rows supplied by the provided TableModel . |
void |
renderRows(TableModel<?> tableModel,
RendererCallback callback)
Removes all rows in the current table replaces them with the rows supplied by the provided TableModel . |
protected void |
renderRows(TableModel<?> tableModel,
TableBulkRenderer.RenderingOptions options)
Render rows using a table model. |
void |
setCellRenderer(TableBulkRenderer.CellRenderer renderer)
Sets the cell renderer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int TIME_SLICE
public static int MAX_TIME
public static int ROWS_PER_TIME_CHECK
Constructor Detail |
---|
public TableBulkRenderer(HTMLTable table)
table
- the table to be bulk renderedpublic TableBulkRenderer(HTMLTable table, TableBulkRenderer.CellRenderer renderer)
table
- the table to be bulk renderedrenderer
- the renderer that should be used during bulk renderingMethod Detail |
---|
public TableBulkRenderer.CellRenderer getCellRenderer()
public final void renderRows(java.util.Iterator<java.util.Iterator<java.lang.Object>> rows, RendererCallback callback)
Iterator
which represents a single row.
rows
- iterator of row iteratorscallback
- callback to be called after the rows are renderedpublic final void renderRows(java.util.List<java.util.List<java.lang.Object>> rows, RendererCallback callback)
This method should only be used when the number of rows is known and of reasonable size, therefore this call is synchronous by default.
rows
- list of rows. Each row itself must be another listcallback
- callback to be called after the rows are renderedpublic final void renderRows(TableModel<?> tableModel, int startRow, int numRows, RendererCallback callback)
TableModel
.
tableModel
- the table datastartRow
- the tableModel's start row indexnumRows
- the number of rows to request from the tableModel -1
indicates all of them *callback
- callback to call after the table is finished being renderedpublic final void renderRows(TableModel<?> tableModel, RendererCallback callback)
TableModel
.
tableModel
- the table modelcallback
- callback to call after the table is finished being renderedpublic void setCellRenderer(TableBulkRenderer.CellRenderer renderer)
renderer
- the renderer to setprotected HTMLTable getTable()
protected void renderRows(java.util.Iterator<java.util.Iterator<java.lang.Object>> rows, TableBulkRenderer.RenderingOptions options)
rows
- Iterator of row iteratorsoptions
- rendering options for this tableprotected final void renderRows(TableModel<?> tableModel, TableBulkRenderer.RenderingOptions options)
tableModel
- table modeloptions
- options
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |