org.jdesktop.swingx.autocomplete
Class ComboBoxCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
org.jdesktop.swingx.autocomplete.ComboBoxCellEditor
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
public class ComboBoxCellEditor
- extends javax.swing.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));
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor |
javax.swing.DefaultCellEditor.EditorDelegate |
Fields inherited from class javax.swing.DefaultCellEditor |
clickCountToStart, delegate, editorComponent |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Constructor Summary |
ComboBoxCellEditor(javax.swing.JComboBox comboBox)
Creates a new ComboBoxCellEditor. |
Methods inherited from class javax.swing.DefaultCellEditor |
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.CellEditor |
addCellEditorListener, removeCellEditorListener |
ComboBoxCellEditor
public ComboBoxCellEditor(javax.swing.JComboBox comboBox)
- Creates a new ComboBoxCellEditor.
- Parameters:
comboBox
- the comboBox that should be used as the cell editor.
Copyright © 2011. All Rights Reserved.