public class KListModelComboBoxAdapter extends KListModelListAdapter implements ComboBoxModel
KListModel
to be used with a
Swing JComboBox
component. This adapter wraps a
KListModel
implementation and exposes a
ComboBoxModel
interface, and translates the corresponding
model events.Modifier and Type | Field and Description |
---|---|
private Object |
selectedItem |
renderer
listeners, model
Constructor and Description |
---|
KListModelComboBoxAdapter(JComboBox jcombobox)
Construct a new
KListModelComboBoxAdapter for the given
JComboBox . |
Modifier and Type | Method and Description |
---|---|
Object |
getSelectedItem() |
void |
setSelectedItem(Object item) |
dataChanged, fireModelChangedEvent, getElementAt, getSize, itemsAdded, itemsChanged, itemsRemoved, setListModel
addListDataListener, getListModel, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, getElementAt, getSize, removeListDataListener
private Object selectedItem
public KListModelComboBoxAdapter(JComboBox jcombobox)
KListModelComboBoxAdapter
for the given
JComboBox
.jcombobox
- The JComboBox
that will be used with this
adapter.public Object getSelectedItem()
getSelectedItem
in interface ComboBoxModel
public void setSelectedItem(Object item)
setSelectedItem
in interface ComboBoxModel
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses