com.sciapp.table
Class AdvancedJTable.InnerTableColumnModel

java.lang.Object
  extended by javax.swing.table.DefaultTableColumnModel
      extended by 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

Field Summary
 
Fields inherited from class javax.swing.table.DefaultTableColumnModel
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth
 
Constructor Summary
AdvancedJTable.InnerTableColumnModel()
          Constructs an InnerTableColumnModel object.
 
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
 

Constructor Detail

AdvancedJTable.InnerTableColumnModel

public AdvancedJTable.InnerTableColumnModel()
Constructs an InnerTableColumnModel object.

Method Detail

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 moved
newIndex - 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)