T - the bean class used by this modelU - the table column definitionpublic class TableBeanModel<T,U extends TableColumn<?,T>>
extends com.github.bordertech.wcomponents.AbstractBeanBoundTableModel
| Constructor and Description |
|---|
TableBeanModel(List<U> columns) |
| Modifier and Type | Method and Description |
|---|---|
static void |
configTable(com.github.bordertech.wcomponents.WTable table)
Helper method to add the columns to the table.
|
RowActionable |
getActionColumn() |
Object |
getBeanKey(T bean)
Determine the bean identifier.
|
List<T> |
getBeanList() |
int |
getChildCount(List<Integer> row) |
TableColumn<?,T> |
getColumn(int col) |
int |
getColumnIdx(String columnId) |
List<U> |
getColumns() |
T |
getRowBean(List<Integer> row) |
int |
getRowCount() |
Object |
getRowKey(List<Integer> row) |
Object |
getValueAt(List<Integer> row,
int col) |
boolean |
isCellEditable(List<Integer> row,
int col) |
protected boolean |
isRowEditable(Object key) |
boolean |
isSelectable(List<Integer> row) |
boolean |
isSortable(int col) |
void |
setSelectable(boolean selectable)
Sets whether the rows are globally selectable.
|
void |
setValueAt(Object value,
List<Integer> row,
int col) |
int[] |
sort(int col,
boolean ascending) |
getBean, getBeanId, getBeanProperty, getBeanValue, setBeanId, setBeanProperty, setBeanProvidergetRendererClass, hasChildren, isDisabled, isExpandable, sortpublic final RowActionable getActionColumn()
public void setValueAt(Object value, List<Integer> row, int col)
setValueAt in interface com.github.bordertech.wcomponents.WTable.TableModelsetValueAt in class com.github.bordertech.wcomponents.AbstractTableModelpublic int getRowCount()
public boolean isCellEditable(List<Integer> row, int col)
isCellEditable in interface com.github.bordertech.wcomponents.WTable.TableModelisCellEditable in class com.github.bordertech.wcomponents.AbstractTableModelpublic boolean isSortable(int col)
isSortable in interface com.github.bordertech.wcomponents.WTable.TableModelisSortable in class com.github.bordertech.wcomponents.AbstractTableModelpublic Object getRowKey(List<Integer> row)
getRowKey in interface com.github.bordertech.wcomponents.WTable.TableModelgetRowKey in class com.github.bordertech.wcomponents.AbstractTableModelpublic int[] sort(int col,
boolean ascending)
sort in interface com.github.bordertech.wcomponents.WTable.TableModelsort in class com.github.bordertech.wcomponents.AbstractTableModelpublic Object getBeanKey(T bean)
bean - the beanpublic TableColumn<?,T> getColumn(int col)
col - the column indexpublic int getColumnIdx(String columnId)
columnId - the column idpublic T getRowBean(List<Integer> row)
row - the row indexpublic static void configTable(com.github.bordertech.wcomponents.WTable table)
table - the table to configurepublic boolean isSelectable(List<Integer> row)
isSelectable in interface com.github.bordertech.wcomponents.WTable.TableModelisSelectable in class com.github.bordertech.wcomponents.AbstractTableModelrow - ignoredpublic void setSelectable(boolean selectable)
selectable - true if the rows are globally selectable, otherwise falseprotected boolean isRowEditable(Object key)
key - the row keyCopyright © 2018. All rights reserved.