A
TableColumnModel
that holds an
EventList
. Each element of
the list corresponds to a
TableColumn
in the model.
The EventTableColumnModel class is
not thread-safe.
Unless otherwise noted, all methods are only safe to be called from the
event dispatch thread. To do this programmatically, use
SwingUtilities.invokeAndWait(Runnable)
.
addColumn
public void addColumn(TableColumn column)
addColumnModelListener
public void addColumnModelListener(TableColumnModelListener listener)
createSelectionModel
protected ListSelectionModel createSelectionModel()
Creates a new default list selection model.
dispose
public void dispose()
fireColumnAdded
protected void fireColumnAdded(TableColumnModelEvent e)
fireColumnMarginChanged
protected void fireColumnMarginChanged()
fireColumnMoved
protected void fireColumnMoved(TableColumnModelEvent e)
fireColumnRemoved
protected void fireColumnRemoved(TableColumnModelEvent e)
fireColumnSelectionChanged
protected void fireColumnSelectionChanged(ListSelectionEvent e)
getColumn
public TableColumn getColumn(int columnIndex)
getColumnCount
public int getColumnCount()
getColumnIndex
public int getColumnIndex(Object identifier)
getColumnIndexAtX
public int getColumnIndexAtX(int x)
getColumnMargin
public int getColumnMargin()
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed()
getColumns
public Enumeration getColumns()
getSelectedColumnCount
public int getSelectedColumnCount()
getSelectedColumns
public int[] getSelectedColumns()
getSelectionModel
public ListSelectionModel getSelectionModel()
getTotalColumnWidth
public int getTotalColumnWidth()
listChanged
public void listChanged(ListEvent listChanges)
moveColumn
public void moveColumn(int columnIndex,
int newIndex)
propertyChange
public void propertyChange(PropertyChangeEvent evt)
Watch for changes to the column width or preferred column width and
trigger a relayout of the table header when they change.
removeColumn
public void removeColumn(TableColumn column)
removeColumnModelListener
public void removeColumnModelListener(TableColumnModelListener listener)
setColumnMargin
public void setColumnMargin(int newMargin)
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean flag)
setSelectionModel
public void setSelectionModel(ListSelectionModel newModel)
valueChanged
public void valueChanged(ListSelectionEvent e)