Class ComboBoxCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
org.jdesktop.swingx.autocomplete.ComboBoxCellEditor
- All Implemented Interfaces:
Serializable, CellEditor, TableCellEditor, TreeCellEditor
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));
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class DefaultCellEditor
DefaultCellEditor.EditorDelegate -
Field Summary
Fields inherited from class DefaultCellEditor
clickCountToStart, delegate, editorComponentFields inherited from class AbstractCellEditor
changeEvent, listenerList -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditingMethods inherited from class AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CellEditor
addCellEditorListener, removeCellEditorListener
-
Constructor Details
-
ComboBoxCellEditor
Creates a new ComboBoxCellEditor.- Parameters:
comboBox- the comboBox that should be used as the cell editor.
-