Class EditableComboBoxCellEditor<T extends java.lang.Comparable<? super T>>

  • Type Parameters:
    T - the list item class
    All Implemented Interfaces:
    java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

    public abstract class EditableComboBoxCellEditor<T extends java.lang.Comparable<? super T>>
    extends BeanListComboBoxCellEditor<T>
    Provides a cell editor (BeanListComboBox) for selecting from a list of beans or creating a new item.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor

        javax.swing.DefaultCellEditor.EditorDelegate
    • Field Summary

      • Fields inherited from class javax.swing.DefaultCellEditor

        clickCountToStart, delegate, editorComponent
      • Fields inherited from class javax.swing.AbstractCellEditor

        changeEvent, listenerList
    • Constructor Detail

      • EditableComboBoxCellEditor

        protected EditableComboBoxCellEditor​(java.text.Format format,
                                             Validator<java.lang.String> validator,
                                             java.lang.String loadingMessage)
      • EditableComboBoxCellEditor

        protected EditableComboBoxCellEditor​(java.text.Format format,
                                             Validator<java.lang.String> validator,
                                             PrefixSelector prefixSelector,
                                             java.lang.String loadingMessage)
    • Method Detail

      • stopCellEditing

        public boolean stopCellEditing()
        Specified by:
        stopCellEditing in interface javax.swing.CellEditor
        Overrides:
        stopCellEditing in class javax.swing.DefaultCellEditor
      • saveItem

        protected abstract T saveItem​(T item)
        Populate item and maybe persist it. If item is persisted then it should also be added to the combo box list.
        Parameters:
        item - the new item from the combo box editor
        Returns:
        the updated item.
      • getCellEditorValue

        public java.lang.Object getCellEditorValue()
        Specified by:
        getCellEditorValue in interface javax.swing.CellEditor
        Overrides:
        getCellEditorValue in class javax.swing.DefaultCellEditor