JComboBox to a MutableSelectionSource. A ComboBoxSelectionSource generates {@link IndexedSelection indexed selections}. A SelectionListener can always safely perform the following cast in its selectionChanged method:
ComboBoxSelectionSource source = ... source.addSelectionListener(new SelectionListener() { public void selectionChanged(SelectionChangedEvent evt) { IndexedSelection selection = (IndexedSelection) evt.getSelection(); ... } }); A ComboBoxSelectionSource will generate selection events if the combobox selection state changes through user interaction, or programmatically.
@author Torgil Zethson
@since 1.3.0
| |