public class MetaColumnModel extends DefaultTableColumnModel
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth| Constructor and Description |
|---|
MetaColumnModel(TableColumnModel baseColumnModel,
TableModel tableModel)
Constructs a new MetaColumnModel from a base ColumnModel and a
TableModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(TableColumn tcol)
When a column is added to this TableColumnModel, add it to the
listModel and set it visible in the visibleModel
|
ListModel<TableColumn> |
getListModel()
Returns the ListModel representing all the columns in the
original TableColumnModel.
|
ListSelectionModel |
getVisibleModel()
Returns the ListSelectionModel representing which columns in the
original TableColumnModel are currently visible (are represented in
this ColumnModel) and which are invisible (are not represented in
this ColumnModel).
|
JMenu |
makeCheckBoxMenu(String name)
Returns a menu component which can be used to control the visibility
of columns in the model.
|
void |
purgeEmptyColumns()
Purges this column model of any column which contains nothing but
blank entries.
|
void |
removeColumn(int ipos)
Sets a column invisible.
|
void |
removeColumn(TableColumn tcol)
When a column is removed from this TableColumnModel, set it
invisible in the visibleModel.
|
addColumnModelListener, createSelectionModel, fireColumnAdded, fireColumnMarginChanged, fireColumnMoved, fireColumnRemoved, fireColumnSelectionChanged, getColumn, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumnModelListeners, getColumns, getColumnSelectionAllowed, getListeners, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, moveColumn, propertyChange, recalcWidthCache, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel, valueChangedpublic MetaColumnModel(TableColumnModel baseColumnModel, TableModel tableModel)
baseColumnModel - the base ColumnModeltableModel - the TableModel which supplies the data
for the columns this object describes; must refer to the
same data as baseColumnModelpublic ListModel<TableColumn> getListModel()
public ListSelectionModel getVisibleModel()
public void addColumn(TableColumn tcol)
addColumn in interface TableColumnModeladdColumn in class DefaultTableColumnModelpublic void removeColumn(TableColumn tcol)
removeColumn in interface TableColumnModelremoveColumn in class DefaultTableColumnModelpublic void removeColumn(int ipos)
ipos - position of the column to removepublic void purgeEmptyColumns()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.