Class AbstractTableDataModel
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractTableDataModel
-
- All Implemented Interfaces:
TableDataModel,Serializable
- Direct Known Subclasses:
AbstractBeanTableDataModel,EmptyTableDataModel,SimpleBeanListTableDataModel,SimpleTableDataModel
@Deprecated public abstract class AbstractTableDataModel extends Object implements TableDataModel, Serializable
Deprecated.UseWTableandAbstractTableModelinstead.A skeleton implementation of a simple data model that does not support filtering, sorting, or editability. Subclasses need only implement theTableDataModel.getRowCount()andTableDataModel.getValueAt(int, int)methods.- Since:
- 1.0.0
- Author:
- Yiannis Paschalidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractTableDataModel()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<String>getFilterValues(int row)Deprecated.This model does not support the concept of row filtering by default.StringgetRowHeader(int row)Deprecated.Row header text is not used by default.booleanisCellEditable(int row, int col)Deprecated.This model does not support the concept of editable cells by default.booleanisDisabled(int row)Deprecated.This model does not support the concept of row disabling by default.booleanisSelectable(int row)Deprecated.This model does not support the concept of row selectability by default.booleanisSortable(int col)Deprecated.This model does not support the concept of sorting by default.voidsetValueAt(Object value, int row, int col)Deprecated.This model does not support the concept of editable cells by default.int[]sort(int col, boolean ascending)Deprecated.This model does not support the concept of sorting by default.protected int[]sort(Comparator<Object> comparator, int col, boolean ascending)Deprecated.Calculates the sort order for the data, using the given column and comparator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.TableDataModel
getRowCount, getValueAt
-
-
-
-
Method Detail
-
getRowHeader
public String getRowHeader(int row)
Deprecated.Row header text is not used by default.- Specified by:
getRowHeaderin interfaceTableDataModel- Parameters:
row- ignored.- Returns:
- null.
-
sort
public int[] sort(int col, boolean ascending)Deprecated.This model does not support the concept of sorting by default. Subclasses will need to override this method andisSortable(int)to support sorting.- Specified by:
sortin interfaceTableDataModel- Parameters:
col- ignored.ascending- ignored.- Returns:
- null
-
setValueAt
public void setValueAt(Object value, int row, int col)
Deprecated.This model does not support the concept of editable cells by default. Subclasses will need to override this method andisCellEditable(int, int)to support cell editing.- Specified by:
setValueAtin interfaceTableDataModel- Parameters:
value- ignored.row- ignored.col- ignored.
-
isSortable
public boolean isSortable(int col)
Deprecated.This model does not support the concept of sorting by default. Subclasses will need to override this method andsort(int, boolean)to support sorting.- Specified by:
isSortablein interfaceTableDataModel- Parameters:
col- ignored.- Returns:
- false.
-
isDisabled
public boolean isDisabled(int row)
Deprecated.This model does not support the concept of row disabling by default. Subclasses will need to override this method to support row disabling.- Specified by:
isDisabledin interfaceTableDataModel- Parameters:
row- ignored.- Returns:
- false.
-
isSelectable
public boolean isSelectable(int row)
Deprecated.This model does not support the concept of row selectability by default. Subclasses will need to override this method disable selection of specific rows.- Specified by:
isSelectablein interfaceTableDataModel- Parameters:
row- ignored.- Returns:
- true.
-
isCellEditable
public boolean isCellEditable(int row, int col)Deprecated.This model does not support the concept of editable cells by default. Subclasses will need to override this method andsetValueAt(Object, int, int)to support cell editing.- Specified by:
isCellEditablein interfaceTableDataModel- Parameters:
row- ignored.col- ignored.- Returns:
- false.
-
getFilterValues
public List<String> getFilterValues(int row)
Deprecated.This model does not support the concept of row filtering by default. Subclasses will need to override this method to support row filtering.- Specified by:
getFilterValuesin interfaceTableDataModel- Parameters:
row- ignored.- Returns:
- false.
-
sort
protected int[] sort(Comparator<Object> comparator, int col, boolean ascending)
Deprecated.Calculates the sort order for the data, using the given column and comparator.- Parameters:
comparator- the comparator to use for sortingcol- the column to sort onascending- true for an ascending sort, false for descending.- Returns:
- the row indices in sort order.
-
-