public class ComboBoxCellEditor extends DefaultCellEditor
This is a cell editor that can be used when a combo box (that has been set
up for automatic completion) is to be used in a JTable. The
DefaultCellEditor
won't work in this
case, because each time an item gets selected it stops cell editing and hides
the combo box.
Usage example:
JTable table = ...;
JComboBox comboBox = ...;
...
TableColumn column = table.getColumnModel().getColumn(0);
column.setCellEditor(new ComboBoxCellEditor(comboBox));
DefaultCellEditor.EditorDelegate
clickCountToStart, delegate, editorComponent
changeEvent, listenerList
Constructor and Description |
---|
ComboBoxCellEditor(JComboBox comboBox)
Creates a new ComboBoxCellEditor.
|
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCellEditorListener, removeCellEditorListener
public ComboBoxCellEditor(JComboBox comboBox)
comboBox
- the comboBox that should be used as the cell editor.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses