public class ETableColumnModel extends DefaultTableColumnModel
Modifier and Type | Field and Description |
---|---|
protected List<TableColumn> |
hiddenColumns
List<ETableColumn>: holds list of columns that were hidden by the
user.
|
protected List<TableColumn> |
sortedColumns
List<ETableColumn>: holds list of sorted columns in this model.
|
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth
Constructor and Description |
---|
ETableColumnModel()
Creates a new instance of ETableColumnModel
|
Modifier and Type | Method and Description |
---|---|
void |
clean()
Removes all columns, including hidden ones.
|
void |
clearSortedColumns()
Makes the whole table unsorted.
|
TableColumnSelector.TreeNode |
getColumnHierarchyRoot()
Allows the user to customize the list of the visible columns using
a hierarchy in a special TableColumnSelector.
|
Comparator<ETable.RowMapping> |
getComparator()
Provides a comparator for sorting the rows of the table.
|
boolean |
isColumnHidden(TableColumn tc)
Test if the column is hidden or visible.
|
void |
moveColumn(int ci1,
int ci2) |
void |
readSettings(Properties p,
String propertyPrefix,
ETable table)
Method allowing to read stored values.
|
void |
removeColumn(TableColumn column) |
void |
setColumnHidden(TableColumn column,
boolean hidden)
Makes the given column hidden or visible according to the parameter
hidden.
|
void |
setColumnHierarchyRoot(TableColumnSelector.TreeNode columnHierarchyRoot)
Allows the user to customize the list of the visible columns using
a hierarchy in a special TableColumnSelector.
|
void |
setColumnSorted(ETableColumn etc,
boolean ascending,
int newRank)
This method marks this column as sorted.
|
void |
writeSettings(Properties p,
String propertyPrefix)
Method allowing to store customization values.
|
addColumn, addColumnModelListener, createSelectionModel, fireColumnAdded, fireColumnMarginChanged, fireColumnMoved, fireColumnRemoved, fireColumnSelectionChanged, getColumn, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumnModelListeners, getColumns, getColumnSelectionAllowed, getListeners, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, propertyChange, recalcWidthCache, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel, valueChanged
protected transient List<TableColumn> sortedColumns
protected List<TableColumn> hiddenColumns
public ETableColumnModel()
public void readSettings(Properties p, String propertyPrefix, ETable table)
public void writeSettings(Properties p, String propertyPrefix)
public Comparator<ETable.RowMapping> getComparator()
public void setColumnSorted(ETableColumn etc, boolean ascending, int newRank)
This method does not refresh the table UI.
Use ETable.setColumnSorted(int, boolean, int)
instead when the UI
should be changed accordingly.
etc
- column in ETable column modelascending
- true means ascendingnewRank
- value 1 means that this is the most important sorted
column, number 2 means second etc.public void removeColumn(TableColumn column)
removeColumn
in interface TableColumnModel
removeColumn
in class DefaultTableColumnModel
public void setColumnHidden(TableColumn column, boolean hidden)
column
- The table column to change the visibility.hidden
- true
to make the column hidden, false
to make it visible.public void moveColumn(int ci1, int ci2)
moveColumn
in interface TableColumnModel
moveColumn
in class DefaultTableColumnModel
public boolean isColumnHidden(TableColumn tc)
tc
- The table column to testtrue
when the column is hidden, false
when it's visible.public void clearSortedColumns()
public void clean()
public TableColumnSelector.TreeNode getColumnHierarchyRoot()
public void setColumnHierarchyRoot(TableColumnSelector.TreeNode columnHierarchyRoot)