|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.DefaultTableColumnModel
com.citra.table.DefaultVetoableColumnModel
public class DefaultVetoableColumnModel
DefaultVetoableColumnModel provides a standard implementation for a VetoableTableColumnModel.
Field Summary |
---|
Fields inherited from class javax.swing.table.DefaultTableColumnModel |
---|
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth |
Constructor Summary | |
---|---|
DefaultVetoableColumnModel()
Constructs a DefaultVetoableColumnModel. |
Method Summary | |
---|---|
void |
addColumn(TableColumn aColumn)
Appends aColumn to the end of the
tableColumns array. |
void |
addVetoableColumnModelListener(VetoableTableColumnModelListener l)
Adds a listener that is notified when a table column is about to be added, moved or removed. |
protected void |
fireColumnWillBeAdded(TableColumnModelEvent e)
Notifies 'veto' listeners that a table column is about to be added. |
protected void |
fireColumnWillBeMoved(TableColumnModelEvent e)
Notifies 'veto' listeners that a table column is about to be moved. |
protected void |
fireColumnWillBeRemoved(TableColumnModelEvent e)
Notifies 'veto' listeners that a table column is about to be removed. |
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. |
void |
removeVetoableColumnModelListener(VetoableTableColumnModelListener l)
Removes a listener that is notified when a table column is about to be added, moved or removed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableColumnModel |
---|
addColumnModelListener, getColumn, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumns, getColumnSelectionAllowed, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel |
Constructor Detail |
---|
public DefaultVetoableColumnModel()
Method Detail |
---|
public void addColumn(TableColumn aColumn)
aColumn
to the end of the
tableColumns
array.
This method also posts the columnAdded
event to its listeners.
addColumn
in interface TableColumnModel
addColumn
in class DefaultTableColumnModel
aColumn
- the TableColumn
to be addedDefaultTableColumnModel.removeColumn(javax.swing.table.TableColumn)
public void addVetoableColumnModelListener(VetoableTableColumnModelListener l)
addVetoableColumnModelListener
in interface VetoableTableColumnModel
l
- the listener to be addedprotected void fireColumnWillBeAdded(TableColumnModelEvent e) throws ColumnModelVetoException
e
- the event identifying the addition
ColumnModelVetoException
protected void fireColumnWillBeMoved(TableColumnModelEvent e) throws ColumnModelVetoException
e
- the event identifying the move
ColumnModelVetoException
protected void fireColumnWillBeRemoved(TableColumnModelEvent e) throws ColumnModelVetoException
e
- the event identifying the removal
ColumnModelVetoException
public void moveColumn(int columnIndex, int newIndex)
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.
moveColumn
in interface TableColumnModel
moveColumn
in class DefaultTableColumnModel
columnIndex
- the index of column to be movednewIndex
- new index to move the columnpublic void removeColumn(TableColumn column)
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.
removeColumn
in interface TableColumnModel
removeColumn
in class DefaultTableColumnModel
column
- the TableColumn
to be removedDefaultTableColumnModel.addColumn(javax.swing.table.TableColumn)
public void removeVetoableColumnModelListener(VetoableTableColumnModelListener l)
removeVetoableColumnModelListener
in interface VetoableTableColumnModel
l
- the listener to be removed
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |