swingwtx.swing.table
Class DefaultTableColumnModel
java.lang.Object
swingwtx.swing.table.DefaultTableColumnModel
- All Implemented Interfaces:
- TableColumnModel
- public class DefaultTableColumnModel
- extends java.lang.Object
- implements TableColumnModel
|
Field Summary |
int |
lastColClicked
This is a real cheat! Because we can't work out X position
accurately, I'm going to assume that when somebody calls
getColumnIndexAtX, they really want the column the mouse
was over last. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lastColClicked
public int lastColClicked
- This is a real cheat! Because we can't work out X position
accurately, I'm going to assume that when somebody calls
getColumnIndexAtX, they really want the column the mouse
was over last. Since I do have that info, I set it here
and return it for getColumnIndexAtX
DefaultTableColumnModel
public DefaultTableColumnModel()
addColumn
public void addColumn(TableColumn t)
- Specified by:
addColumn in interface TableColumnModel
removeColumn
public void removeColumn(TableColumn t)
- Specified by:
removeColumn in interface TableColumnModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface TableColumnModel
getColumn
public TableColumn getColumn(int columnIndex)
- Specified by:
getColumn in interface TableColumnModel
getColumnIndexAtX
public int getColumnIndexAtX(int xPosition)
- Specified by:
getColumnIndexAtX in interface TableColumnModel
getColumnIndex
public int getColumnIndex(java.lang.Object columnIdentifier)
- Specified by:
getColumnIndex in interface TableColumnModel
getColumnMargin
public int getColumnMargin()
- Specified by:
getColumnMargin in interface TableColumnModel
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed()
- Specified by:
getColumnSelectionAllowed in interface TableColumnModel
getColumns
public java.util.Enumeration getColumns()
- Specified by:
getColumns in interface TableColumnModel
getSelectedColumnCount
public int getSelectedColumnCount()
- Specified by:
getSelectedColumnCount in interface TableColumnModel
getSelectedColumns
public int[] getSelectedColumns()
- Specified by:
getSelectedColumns in interface TableColumnModel
getSelectionModel
public ListSelectionModel getSelectionModel()
- Specified by:
getSelectionModel in interface TableColumnModel
getTotalColumnWidth
public int getTotalColumnWidth()
- Specified by:
getTotalColumnWidth in interface TableColumnModel
moveColumn
public void moveColumn(int columnIndex,
int newIndex)
- Specified by:
moveColumn in interface TableColumnModel
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean flag)
- Specified by:
setColumnSelectionAllowed in interface TableColumnModel
setSelectionModel
public void setSelectionModel(ListSelectionModel newModel)
- Specified by:
setSelectionModel in interface TableColumnModel
setColumnMargin
public void setColumnMargin(int newMargin)
- Specified by:
setColumnMargin in interface TableColumnModel
addColumnModelListener
public void addColumnModelListener(TableColumnModelListener x)
- Specified by:
addColumnModelListener in interface TableColumnModel
removeColumnModelListener
public void removeColumnModelListener(TableColumnModelListener x)
- Specified by:
removeColumnModelListener in interface TableColumnModel
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)
valueChanged
public void valueChanged(ListSelectionEvent e)