com.sciapp.table
Class AdvancedJTable.InnerTableColumnModel
java.lang.Object
javax.swing.table.DefaultTableColumnModel
com.sciapp.table.AdvancedJTable.InnerTableColumnModel
- All Implemented Interfaces:
- PropertyChangeListener, Serializable, EventListener, ListSelectionListener, TableColumnModel
- Enclosing class:
- AdvancedJTable
public class AdvancedJTable.InnerTableColumnModel
- extends DefaultTableColumnModel
InnerTableColumnModel extends DefaultTableColumnModel in order to make
the first column of the TreeTable not reorderable (optionally).
- See Also:
- Serialized Form
Method Summary |
void |
moveColumn(int columnIndex,
int newIndex)
Moves the column and heading at columnIndex to
newIndex . |
void |
removeColumn(TableColumn column)
Deletes the column from the
tableColumns array. |
Methods inherited from class javax.swing.table.DefaultTableColumnModel |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdvancedJTable.InnerTableColumnModel
public AdvancedJTable.InnerTableColumnModel()
- Constructs an InnerTableColumnModel object.
moveColumn
public void moveColumn(int columnIndex,
int newIndex)
- Moves the column and heading at
columnIndex
to
newIndex
. The old column at columnIndex
will now be found at newIndex
. The column
that used to be at newIndex
is shifted
left or right to make room. This will not move any columns if
columnIndex
equals newIndex
. This method
also posts a columnMoved
event to its listeners.
- Specified by:
moveColumn
in interface TableColumnModel
- Overrides:
moveColumn
in class DefaultTableColumnModel
- Parameters:
columnIndex
- the index of column to be movednewIndex
- new index to move the column
removeColumn
public void removeColumn(TableColumn column)
- Deletes the
column
from the
tableColumns
array. This method will do nothing if
column
is not in the table's columns list.
tile
is called
to resize both the header and table views.
This method also posts a columnRemoved
event to its listeners.
- Specified by:
removeColumn
in interface TableColumnModel
- Overrides:
removeColumn
in class DefaultTableColumnModel
- Parameters:
column
- the TableColumn
to be removed- See Also:
DefaultTableColumnModel.addColumn(javax.swing.table.TableColumn)