This class may be instantiated; it is not intended to be subclassed.
@noextend This class is not intended to be subclassed by clients.You can create a ComboBoxCellEditor either by setting the items to show statically by constructor, or by using an {@link IComboBoxDataProvider}. Last one is a way to dynamically populate the items showed in a combobox in NatTable. It is not possible to mix these two approaches!
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 {@link javax.swing.DefaultCellEditor DefaultCellEditor} won't work in thiscase, 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));
|
|