JIDE 3.5.15

com.jidesoft.grid
Class LegacyListComboBoxCellEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by com.jidesoft.grid.AbstractJideCellEditor
          extended by com.jidesoft.grid.ContextSensitiveCellEditor
              extended by com.jidesoft.grid.AbstractComboBoxCellEditor
                  extended by com.jidesoft.grid.LegacyListComboBoxCellEditor
All Implemented Interfaces:
ConverterContextSupport, EditorContextSupport, EditorStyleSupport, JideCellEditor, ActionListener, ItemListener, Serializable, EventListener, CellEditor, PopupMenuListener, TableCellEditor
Direct Known Subclasses:
LegacyBooleanCellEditor, LegacyEnumCellEditor, LegacyFontNameCellEditor

public class LegacyListComboBoxCellEditor
extends AbstractComboBoxCellEditor

This class is for any cell editor where one needs to choose value from a list. It used ListComboBox as the editor.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jidesoft.grid.AbstractComboBoxCellEditor
_comboBox
 
Fields inherited from class com.jidesoft.grid.ContextSensitiveCellEditor
DEFAULT_CELL_EDITOR_BORDER
 
Fields inherited from class com.jidesoft.grid.AbstractJideCellEditor
_clickCountToStart
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
LegacyListComboBoxCellEditor()
           
LegacyListComboBoxCellEditor(ComboBoxModel model)
          Creates a LegacyListComboBoxCellEditor that takes it's items from an existing ComboBoxModel.
LegacyListComboBoxCellEditor(ComboBoxModel model, Class<?> type)
          Creates a LegacyListComboBoxCellEditor that takes it's items from an existing ComboBoxModel.
LegacyListComboBoxCellEditor(Object[] data)
          Creates a LegacyListComboBoxCellEditor that contains the elements in the specified array.
LegacyListComboBoxCellEditor(Object[] data, Class<?> type)
          Creates a LegacyListComboBoxCellEditor that contains the elements in the specified array.
LegacyListComboBoxCellEditor(Vector<?> data)
          Creates a LegacyListComboBoxCellEditor that contains the elements in the specified Vector.
LegacyListComboBoxCellEditor(Vector<?> data, Class<?> type)
          Creates a LegacyListComboBoxCellEditor that contains the elements in the specified Vector.
 
Method Summary
 AbstractComboBox createAbstractComboBox()
          Creates an AbstractComboBox or its subclass used by this cell editor.
 AbstractComboBox createAbstractComboBox(ComboBoxModel model, Class<?> type)
          Creates an AbstractComboBox or its subclass used by this cell editor.
protected  ListComboBox createListComboBox(ComboBoxModel model, Class<?> type)
          Creates the list combobox.
 void setConverterContext(ConverterContext context)
          Set the converter context for the cell editor.
 void setPossibleValues(Object[] data)
          Sets possible value set for the cell editor.
 
Methods inherited from class com.jidesoft.grid.AbstractComboBoxCellEditor
actionPerformed, customizeAbstractComboBox, getCellEditorValue, getComboBox, getTableCellEditorComponent, isEditorStyleSupported, itemStateChanged, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, setCellEditorValue, setConverter, stopCellEditing
 
Methods inherited from class com.jidesoft.grid.ContextSensitiveCellEditor
getConverter, getConverterContext, getEditorContext, getEditorStyle, getType, isUseConverterContext, setEditorContext, setEditorStyle, setType, setUseConverterContext
 
Methods inherited from class com.jidesoft.grid.AbstractJideCellEditor
addValidationListener, getClickCountToStart, getDefaultErrorBehavior, getValidationListeners, isAutoStopCellEditing, isCellEditable, isPassEnterKeyToTable, removeValidationListener, setAutoStopCellEditing, setClickCountToStart, setDefaultErrorBehavior, setPassEnterKeyToTable, validate
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell
 
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, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell
 

Constructor Detail

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor()

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor(Object[] data)
Creates a LegacyListComboBoxCellEditor that contains the elements in the specified array. By default the first item in the array (and therefore the data model) becomes selected.

Parameters:
data - an array of objects to insert into the combo box

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor(Vector<?> data)
Creates a LegacyListComboBoxCellEditor that contains the elements in the specified Vector. By default the first item in the Vector (and therefore the data model) becomes selected.

Parameters:
data - an array of objects to insert into the combo box

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor(ComboBoxModel model)
Creates a LegacyListComboBoxCellEditor that takes it's items from an existing ComboBoxModel. Since the ComboBoxModel is provided, a combo box created using this constructor does not create a default combo box model and may impact how the insert, remove and add methods behave.

Parameters:
model - the ComboBoxModel that provides the displayed list of items

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor(Object[] data,
                                    Class<?> type)
Creates a LegacyListComboBoxCellEditor that contains the elements in the specified array. By default the first item in the array (and therefore the data model) becomes selected.

Parameters:
data - an array of objects to insert into the combo box
type - type of element in the data array.

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor(Vector<?> data,
                                    Class<?> type)
Creates a LegacyListComboBoxCellEditor that contains the elements in the specified Vector. By default the first item in the Vector (and therefore the data model) becomes selected.

Parameters:
data - an array of objects to insert into the combo box
type - type of element in the data vector.

LegacyListComboBoxCellEditor

public LegacyListComboBoxCellEditor(ComboBoxModel model,
                                    Class<?> type)
Creates a LegacyListComboBoxCellEditor that takes it's items from an existing ComboBoxModel. Since the ComboBoxModel is provided, a combo box created using this constructor does not create a default combo box model and may impact how the insert, remove and add methods behave.

Parameters:
model - the ComboBoxModel that provides the displayed list of items
type - the element type.
Method Detail

createAbstractComboBox

public AbstractComboBox createAbstractComboBox(ComboBoxModel model,
                                               Class<?> type)
Description copied from class: AbstractComboBoxCellEditor
Creates an AbstractComboBox or its subclass used by this cell editor. Different from AbstractComboBoxCellEditor.createAbstractComboBox(), this method takes a ComboBoxModel and type. By default, this method will call createAbstractComboBox() but subclass can override it to create an AbstractComboBox.

Overrides:
createAbstractComboBox in class AbstractComboBoxCellEditor
Parameters:
model - the combobox model.
type - the type of the element in the model.
Returns:
an AbstractComboBox.

createAbstractComboBox

public AbstractComboBox createAbstractComboBox()
Description copied from class: AbstractComboBoxCellEditor
Creates an AbstractComboBox or its subclass used by this cell editor.

Specified by:
createAbstractComboBox in class AbstractComboBoxCellEditor
Returns:
an AbstractComboBox.

createListComboBox

protected ListComboBox createListComboBox(ComboBoxModel model,
                                          Class<?> type)
Creates the list combobox.

Parameters:
model - the ComboBoxModel that provides the displayed list of items
type - the element type.
Returns:
the list combobox.

setPossibleValues

public void setPossibleValues(Object[] data)
Sets possible value set for the cell editor.

Parameters:
data - the possible value set

setConverterContext

public void setConverterContext(ConverterContext context)
Description copied from class: ContextSensitiveCellEditor
Set the converter context for the cell editor.

By default, this context is null so that the converter context of the cell editor will be the same as the converter context of the cell in the ContextSensitiveTable. You could set this context to a non-null value so that the editor could have different converter context with the cell itself.

While getting converter context, it will first check this method then check ContextSensitiveCellEditor.isUseConverterContext() to decide if the editor should use the cell's converter context or use null always.

Specified by:
setConverterContext in interface ConverterContextSupport
Overrides:
setConverterContext in class ContextSensitiveCellEditor
Parameters:
context - the converter context
See Also:
ContextSensitiveCellEditor.getConverterContext()

JIDE 3.5.15