org.kuali.student.common.ui.client.widgets.pagetable
Class PagingScrollTableBuilder<RowType extends Idable>

java.lang.Object
  extended by org.kuali.student.common.ui.client.widgets.pagetable.PagingScrollTableBuilder<RowType>

Deprecated.

@Deprecated
public class PagingScrollTableBuilder<RowType extends Idable>
extends Object

Constructing a PagingScrollTable from GWT's Incubator is complicated. This class uses the Builder Pattern to simplify it. All public methods, except build() return a reference to the builder so methods can be chained; these methods can be called in any order. Calling build() at the end of the chain returns the constructed PagingScrollTable pagingScrollTable = new PagingScrollTableBuilder<Person>().tablePixelSize(220, 200).cacheTable(10, 10). columnDefinitions(createColumnDefinitions()).build(new PersonDTOs().getPersons()); Parameterized type is the Data Transfer Object type which contains a row's data Column Definitions map a table column to a dto's field and set column header PagingOptions are the paging widget. It is created after the builder creates the table and may be positioned anywhere.

Author:
Kuali Student Team (gstruthers@berkeley.edu)
See Also:
RowSelectionHandler is added after the builder creates the table., RowSelectionHandler, com.google.gwt.gen2.table.event.client.FixedWidthGrid, TableSelectionToLabelHandler

Constructor Summary
PagingScrollTableBuilder()
          Deprecated. This constructs the builder
 
Method Summary
 com.google.gwt.gen2.table.client.PagingScrollTable<RowType> build(GenericTableModel tableModel)
          Deprecated. This method builds the table model.
 PagingScrollTableBuilder<RowType> cacheTable(int numPageRows, int numPages)
          Deprecated. This method defines the table's cache Optional, use for paging table only.
 PagingScrollTableBuilder<RowType> columnDefinitions(List<com.google.gwt.gen2.table.client.AbstractColumnDefinition<RowType,?>> columnDefs)
          Deprecated. This method adds the table's column definitions Required
 PagingScrollTableBuilder<RowType> setSelectionPolicy(com.google.gwt.gen2.table.client.SelectionGrid.SelectionPolicy selectionPolicy)
          Deprecated. This method sets row selection policy.
 PagingScrollTableBuilder<RowType> tablePixelSize(int tablePixelWidth, int tablePixelHeight)
          Deprecated. This method defines the table's display size in pixels Required
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagingScrollTableBuilder

public PagingScrollTableBuilder()
Deprecated. 
This constructs the builder

Method Detail

tablePixelSize

public PagingScrollTableBuilder<RowType> tablePixelSize(int tablePixelWidth,
                                                        int tablePixelHeight)
Deprecated. 
This method defines the table's display size in pixels Required

Parameters:
tablePixelWidth -
tablePixelHeight -
Returns:
builder

cacheTable

public PagingScrollTableBuilder<RowType> cacheTable(int numPageRows,
                                                    int numPages)
Deprecated. 
This method defines the table's cache Optional, use for paging table only. If not called, table displays all rows.

Parameters:
numPageRows - to display on a page
numPages - in the table
Returns:
builder

columnDefinitions

public PagingScrollTableBuilder<RowType> columnDefinitions(List<com.google.gwt.gen2.table.client.AbstractColumnDefinition<RowType,?>> columnDefs)
Deprecated. 
This method adds the table's column definitions Required

Parameters:
columnDefs - table display column index equals columnDefs index
Returns:
builder
See Also:
Set a column definitions preferredWidth in pixels, and the builder will use that to set the column width in the table. This works around setPreferredWidth not setting it itself. ColumnDefinitions may be reused in other PagingScrollTables for the same dto. They are passed to the builder as a {@code List>} Where rowType is the dto and '?' is the column type. The column definition's index in the list is its column index in the table.

setSelectionPolicy

public PagingScrollTableBuilder<RowType> setSelectionPolicy(com.google.gwt.gen2.table.client.SelectionGrid.SelectionPolicy selectionPolicy)
Deprecated. 
This method sets row selection policy. Get this setting from the search definition when it is available. Default is MULTI_ROW Optional

Parameters:
selectionPolicy -
Returns:
builder
Since:
M5

build

public com.google.gwt.gen2.table.client.PagingScrollTable<RowType> build(GenericTableModel tableModel)
Deprecated. 
This method builds the table model. Call at the end of the builder method chain. Required

Returns:
the built pagingScrollTable


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.