public class MetaColumnModel
extends javax.swing.table.DefaultTableColumnModel
Constructor | Description |
---|---|
MetaColumnModel(javax.swing.table.TableColumnModel baseColumnModel,
javax.swing.table.TableModel tableModel) |
Constructs a new MetaColumnModel from a base ColumnModel and a
TableModel.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addColumn(javax.swing.table.TableColumn tcol) |
When a column is added to this TableColumnModel, add it to the
listModel and set it visible in the visibleModel
|
javax.swing.ListModel |
getListModel() |
Returns the ListModel representing all the columns in the
original TableColumnModel.
|
javax.swing.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).
|
javax.swing.JMenu |
makeCheckBoxMenu(java.lang.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(javax.swing.table.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, valueChanged
public MetaColumnModel(javax.swing.table.TableColumnModel baseColumnModel, javax.swing.table.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 javax.swing.ListModel getListModel()
TableColumn
.public javax.swing.ListSelectionModel getVisibleModel()
public void addColumn(javax.swing.table.TableColumn tcol)
addColumn
in class javax.swing.table.DefaultTableColumnModel
public void removeColumn(javax.swing.table.TableColumn tcol)
removeColumn
in class javax.swing.table.DefaultTableColumnModel
public void removeColumn(int ipos)
ipos
- position of the column to removepublic void purgeEmptyColumns()
public javax.swing.JMenu makeCheckBoxMenu(java.lang.String name)
name
- the name of the menuCopyright ? 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.