|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.ui.client.widgets.pagetable.PagingScrollTableBuilder<RowType>
@Deprecated public class PagingScrollTableBuilder<RowType extends Idable>
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.
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 |
---|
public PagingScrollTableBuilder()
Method Detail |
---|
public PagingScrollTableBuilder<RowType> tablePixelSize(int tablePixelWidth, int tablePixelHeight)
tablePixelWidth
- tablePixelHeight
-
public PagingScrollTableBuilder<RowType> cacheTable(int numPageRows, int numPages)
numPageRows
- to display on a pagenumPages
- in the table
public PagingScrollTableBuilder<RowType> columnDefinitions(List<com.google.gwt.gen2.table.client.AbstractColumnDefinition<RowType,?>> columnDefs)
columnDefs
- table display column index equals columnDefs index
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.
public PagingScrollTableBuilder<RowType> setSelectionPolicy(com.google.gwt.gen2.table.client.SelectionGrid.SelectionPolicy selectionPolicy)
selectionPolicy
-
public com.google.gwt.gen2.table.client.PagingScrollTable<RowType> build(GenericTableModel tableModel)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |