com.google.gwt.widgetideas.table.client
Class BulkLoadedTable

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.widgetideas.table.client.overrides.HTMLTable
                  extended by com.google.gwt.widgetideas.table.client.overrides.FlexTable
                      extended by com.google.gwt.widgetideas.table.client.BulkLoadedTable
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.SourcesTableEvents, BulkLoader.BulkLoadable, HasCellSpans, HasColumns
Direct Known Subclasses:
PreloadedTable

public class BulkLoadedTable
extends FlexTable
implements BulkLoader.BulkLoadable

Table data, provided by a specificTableModel, is bulk loaded into the current table.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.overrides.FlexTable
FlexTable.FlexCellFormatter
 
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.overrides.HTMLTable
HTMLTable.CellFormatter, HTMLTable.ColumnFormatter, HTMLTable.RowFormatter, HTMLTable.WidgetMapper
 
Nested classes/interfaces inherited from interface com.google.gwt.widgetideas.table.client.BulkLoader.BulkLoadable
BulkLoader.BulkLoadable.StringCellRenderer
 
Constructor Summary
BulkLoadedTable()
          Constructor.
 
Method Summary
 BulkLoader.BulkLoadable.StringCellRenderer getRenderer()
           
 int getRowsPerTimeCheck()
           
 void renderRows(java.util.List rows)
          Sets the table's rows to the list of rows provided.
 void renderRows(TableModel tableModel)
          Sets the table's rows to all the data contained in the given tableModel.
 void renderRows(TableModel tableModel, int startRow, int numRows)
          Init rows removes all rows in the current table and adds the rows supplied by the tableModel.
 void setBodyElement(com.google.gwt.user.client.Element e)
          Sets the body element of the table.
 void setOnLoadCompleteCallBack(BulkLoader.OnLoadCompleteCallBack callback)
          Sets a callback to be called after the table is finished being loaded.
 void setRenderer(BulkLoader.BulkLoadable.StringCellRenderer renderer)
          Adds a renderer to the data table to change how the tableModel's cells are rendered.
 void setRowsPerTimeCheck(int rowsPerTimeCheck)
          Sets how many rows should be processed before time is checked for an event flush.
 
Methods inherited from class com.google.gwt.widgetideas.table.client.overrides.FlexTable
addCell, addCells, getCellCount, getColumnIndex, getFlexCellFormatter, getRowCount, insertCell, insertRow, prepareCell, prepareRow, removeCell, removeCells, removeRow
 
Methods inherited from class com.google.gwt.widgetideas.table.client.overrides.HTMLTable
addTableListener, checkCellBounds, checkRowBounds, cleanCell, clear, clearAll, clearCell, createCell, getBodyElement, getCellContainer, getCellContainer, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, getWidgetMap, insertCells, internalClearCell, isCellPresent, iterator, onBrowserEvent, prepareColumn, remove, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setClearText, setColumnFormatter, setHTML, setRowFormatter, setText, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onDetach, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.widgetideas.table.client.BulkLoader.BulkLoadable
getElement
 
Methods inherited from interface com.google.gwt.widgetideas.table.client.HasColumns
getElement, getOffsetWidth, setStyleName
 

Constructor Detail

BulkLoadedTable

public BulkLoadedTable()
Constructor.

Method Detail

renderRows

public void renderRows(java.util.List rows)
Sets the table's rows to the list of rows provided. For example,
   ArrayList rows = new ArrayList();
   ArrayList row1 = new ArrayList();
   row1.add("cell 0,1");
   row1.add("cell 0,2");
   rows.add(row1);
   renderRows(rows);
 

Parameters:
rows - list of rows. Each row itself must be another list

renderRows

public void renderRows(TableModel tableModel)
Sets the table's rows to all the data contained in the given tableModel.

Parameters:
tableModel - the data tableModel

setBodyElement

public void setBodyElement(com.google.gwt.user.client.Element e)
Sets the body element of the table.

Specified by:
setBodyElement in interface BulkLoader.BulkLoadable
Overrides:
setBodyElement in class HTMLTable

renderRows

public void renderRows(TableModel tableModel,
                       int startRow,
                       int numRows)
Init rows removes all rows in the current table and adds the rows supplied by the tableModel.

Parameters:
tableModel - the table data
startRow - the tableModel's start row index
numRows - the number of rows to request from the tableModel -1 indicates all of them

setRenderer

public void setRenderer(BulkLoader.BulkLoadable.StringCellRenderer renderer)
Adds a renderer to the data table to change how the tableModel's cells are rendered.

Parameters:
renderer - the renderer

getRenderer

public BulkLoader.BulkLoadable.StringCellRenderer getRenderer()
Specified by:
getRenderer in interface BulkLoader.BulkLoadable

setOnLoadCompleteCallBack

public void setOnLoadCompleteCallBack(BulkLoader.OnLoadCompleteCallBack callback)
Sets a callback to be called after the table is finished being loaded.

Parameters:
callback - the callback

setRowsPerTimeCheck

public void setRowsPerTimeCheck(int rowsPerTimeCheck)
Sets how many rows should be processed before time is checked for an event flush. Note: If rowsPerTimeCheck is set to anything other than Integer.MAX_VALUE, then the table is constructed asynchronously.

Parameters:
rowsPerTimeCheck -

getRowsPerTimeCheck

public int getRowsPerTimeCheck()