public interface HasColumns<T>
Modifier and Type | Method and Description |
---|---|
void |
addColumn(Column<T,?> column)
Add a new column to the data view.
|
void |
addColumn(Column<T,?> column,
String header)
Add a new column to the data view.
|
int |
getColumnOffset()
Get the offset column index (used when selection mode is on).
|
List<Column<T,?>> |
getColumns()
Get the current defined columns.
|
void |
insertColumn(int beforeIndex,
Column<T,?> col,
String header)
Inserts a column into the table at the specified index.
|
void |
removeColumn(int colIndex)
Remove an existing column by index.
|
void |
removeColumns()
Remove all columns.
|
void |
sort(Column<T,?> column)
Sort a column.
|
void |
sort(Column<T,?> column,
SortDir dir)
Sort a column.
|
void |
sort(int columnIndex)
Sort a column matching the given index (the index excludes the selection box row).
|
void |
sort(int columnIndex,
SortDir dir)
Sort a column matching the given index (the index excludes the selection box row).
|
void addColumn(Column<T,?> column)
column
- the column objectvoid addColumn(Column<T,?> column, String header)
column
- the column objectvoid insertColumn(int beforeIndex, Column<T,?> col, String header)
beforeIndex
- the index to insert the columncol
- the column to be addedIndexOutOfBoundsException
- if the index is out of rangevoid removeColumn(int colIndex)
colIndex
- the columns placement indexvoid removeColumns()
List<Column<T,?>> getColumns()
int getColumnOffset()
void sort(int columnIndex)
columnIndex
- valid index to the user added Column
s.void sort(int columnIndex, SortDir dir)
columnIndex
- valid index to the user added Column
s.dir
- the sort direction or null for auto reversing.void sort(Column<T,?> column)
column
- matching column that was added via ##addColumn(Column)
.Copyright © 2018. All rights reserved.