com.sage.swt.client.widget.table
Class SortableTableModel

java.lang.Object
  extended by com.sage.swt.client.widget.table.BaseTableModel
      extended by com.sage.swt.client.widget.table.SortableTableModel
All Implemented Interfaces:
HasCellAttributeChangeHandlers, HasCellValueChangeHandlers, HasRowInsertionHandlers, HasRowRemovalHandlers, HasRowStatusChangeHandlers, HasRowValueChangeHandlers, HasSetCellValueHandlers, HasSpinnerStartHandlers, HasSpinnerStopHandlers, HasTableLoadHandlers
Direct Known Subclasses:
RowDataTableModel

public class SortableTableModel
extends BaseTableModel

A base class to retrieve and store row data to be used in the table.


Constructor Summary
SortableTableModel()
          Constructor
 
Method Summary
 void columnSorting(RowDataColumnDefinition colDef, boolean isAscending, IRowDataCallback callback)
          reload table data and ordered by index
 SortSpecification getOrderBy()
          Get the sorting expression for the table model
protected  void sorting(IRowDataCallback callback)
          Sort the table
 
Methods inherited from class com.sage.swt.client.widget.table.BaseTableModel
addCellAttributeChangeHandler, addCellValueChangeHandler, addHandler, addRow, addRow, addRowInsertionHandler, addRowRemovalHandler, addRowStatusChangeHandler, addRowValueChangeHandler, addSetCellValueHandler, addSpinnerStartHandler, addSpinnerStopHandler, addTableLoadHandler, addToCache, appendBlankRowAtEOF, appendRow, clearCache, commitNewRow, containsAllKeys, fireEvent, getCellData, getCellValue, getCellValueHandlerAdded, getColumnAttibute, getHeaderRow, getIndexByKey, getKey, getLastRequestIndex, getLastRow, getNewRow, getRow, getRowCount, getRowIerator, getRowIeratorWithFilledRows, getRowIndex, getRowIndex, getRowIndex, getRowOffset, getTableDefinition, hasNewRow, inDSAction, inInsertMode, insertRow, insertRow, insertRow, insertRows, insertRowValue, inSetPropertyValueAction, isBOF, isCellReadOnly, isEOF, isLastEditableCell, isLastEmptyRow, isNewRow, onRowInserted, onRowRemoved, onSetRowValue, removeRow, removeRowFromCache, requestRows, setBOF, setCellValue, setCellValue, setCellValue, setColumnAttibute, setCommitedNewRow, setCommitedRow, setEOF, setRow, setRow, setRows, setRowValue, setTableDefinition, swap, updateRow, updateRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortableTableModel

public SortableTableModel()
Constructor

Method Detail

columnSorting

public void columnSorting(RowDataColumnDefinition colDef,
                          boolean isAscending,
                          IRowDataCallback callback)
reload table data and ordered by index

Parameters:
colDef - the column definition associated with column for sorting
isAscending - the sorting order
callback - the callback for this function

getOrderBy

public SortSpecification getOrderBy()
Get the sorting expression for the table model

Returns:
the sorting expression for the table model

sorting

protected void sorting(IRowDataCallback callback)
Sort the table

Parameters:
callback - the callback of the sorting action


Copyright © 2011 Sage Software, Inc. All rights reserved.