public class SwingEnumEditor extends SwingEditorSupport implements java.awt.event.ActionListener, BindablePropertyEditor
| Modifier and Type | Field and Description |
|---|---|
javax.swing.JComboBox |
combobox |
bean, BUTTON_MARGIN, canceled, fpmi, LARGE_DIMENSION, MEDIUM_DIMENSION, modelColumn, modelRow, panel, propertyName, SMALL_DIMENSION, tableModel, TINY_DIMENSION| Constructor and Description |
|---|
SwingEnumEditor() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Event is set when a combo selection changes.
|
protected void |
init(java.beans.FeatureDescriptor descriptor)
Initializes this property editor with the enumerated items.
|
boolean |
isBindableEnabled() |
void |
setBindableEnabled(boolean b) |
void |
setValue(java.lang.Object value) |
getBean, getContext, getCustomEditor, getFPMIContext, getPropertyName, init, isCanceled, setAlignment, supportsCustomEditorpublic void setValue(java.lang.Object value)
setValue in interface java.beans.PropertyEditorsetValue in class java.beans.PropertyEditorSupportprotected void init(java.beans.FeatureDescriptor descriptor)
This method does a lot of jiggery pokery since enumerated types are unlike any other homogenous types. Enumerated types may not represent the same set of values.
One method would be to empty the list of values which would have the side effect of firing notification events. Another method would be to recreate the combobox.
init in class SwingEditorSupportpublic void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerpublic boolean isBindableEnabled()
isBindableEnabled in interface BindablePropertyEditorpublic void setBindableEnabled(boolean b)
setBindableEnabled in interface BindablePropertyEditor