public static class DataTableOptionsExample.ExampleDataModel extends AbstractTableDataModel
| Constructor and Description |
|---|
ExampleDataModel() |
| Modifier and Type | Method and Description |
|---|---|
List<DataTableOptionsExample.ExampleBean> |
getData() |
int |
getRowCount() |
String |
getRowHeader(int row) |
Object |
getValueAt(int row,
int col) |
boolean |
isSortable(int col)
Indicates whether the given column is sortable.
|
void |
setData(List<DataTableOptionsExample.ExampleBean> data) |
int[] |
sort(int col,
boolean ascending)
Sort the sample data.
|
getFilterValues, isCellEditable, isDisabled, isSelectable, setValueAt, sortpublic List<DataTableOptionsExample.ExampleBean> getData()
public int getRowCount()
public Object getValueAt(int row, int col)
public String getRowHeader(int row)
getRowHeader in interface TableDataModelgetRowHeader in class AbstractTableDataModelpublic void setData(List<DataTableOptionsExample.ExampleBean> data)
data - the list of sample data.public int[] sort(int col,
boolean ascending)
sort in interface TableDataModelsort in class AbstractTableDataModelcol - the index of the column to sort by.ascending - true if sort ascending.public boolean isSortable(int col)
isSortable in interface TableDataModelisSortable in class AbstractTableDataModelcol - the column indexCopyright © 2024. All rights reserved.