Class AbstractTreeTableDataModel
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractTreeTableDataModel
-
- All Implemented Interfaces:
TableDataModel,TreeTableDataModel,Serializable
- Direct Known Subclasses:
SimpleBeanTreeTableDataModel
@Deprecated public abstract class AbstractTreeTableDataModel extends Object implements TreeTableDataModel, Serializable
Deprecated.UseWTableandAbstractTableModelinstead.A default implementation of theTreeTableDataModelinterface. This implementation does not support editing, row selection, filtering etc. In this implementation, the root node is never used.- Since:
- 1.0.0
- Author:
- Yiannis Paschalidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeTableDataModel(TableTreeNode root)Deprecated.Creates a SimpleTableDataModel containing the given data.
-
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.TableTreeNodegetNodeAtLine(int row)Deprecated.Returns the node at the given line.protected TableTreeNodegetRootNode()Deprecated.intgetRowCount()Deprecated.Retrieves the number of rows in the model.StringgetRowHeader(int row)Deprecated.Row header text is not used by default.ObjectgetValueAt(int row, int col)Deprecated.Retrieves the value at the given row and column.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.-
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.TreeTableDataModel
getValueAt
-
-
-
-
Constructor Detail
-
AbstractTreeTableDataModel
public AbstractTreeTableDataModel(TableTreeNode root)
Deprecated.Creates a SimpleTableDataModel containing the given data. Note that applications may wish to create their own TableTreeNode extensions that dynamically load data on e.g. the first call to setExpanded(true) .
- Parameters:
root- the root node for the table. Must not be null.
-
-
Method Detail
-
getNodeAtLine
public final TableTreeNode getNodeAtLine(int row)
Deprecated.Returns the node at the given line.- Specified by:
getNodeAtLinein interfaceTreeTableDataModel- Parameters:
row- the row index.- Returns:
- the node at the given line, or null if the index is out of bounds.
-
getRowCount
public final int getRowCount()
Deprecated.Retrieves the number of rows in the model.- Specified by:
getRowCountin interfaceTableDataModel- Returns:
- the number of rows in the model.
-
getValueAt
public final Object getValueAt(int row, int col)
Deprecated.Retrieves the value at the given row and column. This implementation delegates toTreeTableDataModel.getValueAt(TableTreeNode, int), which subclasses must implement.- Specified by:
getValueAtin interfaceTableDataModel- Parameters:
row- the row indexcol- the column index.- Returns:
- the value for the specified cell.
-
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.
-
getRootNode
protected TableTreeNode getRootNode()
Deprecated.- Returns:
- the table root node.
-
-