public class EventComboBoxModel<E> extends EventListModel<E> implements ComboBoxModel
The implementation of setSelectedItem(java.lang.Object)
and getSelectedItem()
is not in any way tied to the contents of the list.
listDataEvent
Constructor and Description |
---|
EventComboBoxModel(EventList<E> source)
Creates a new combo box model that contains the elements of the given
source and tracks further changes made to it. |
Modifier and Type | Method and Description |
---|---|
Object |
getSelectedItem()
Gets the currently selected item.
|
void |
setSelectedItem(Object selected)
Sets the currently selected item.
|
addListDataListener, dispose, fireListDataEvent, getElementAt, getSize, listChanged, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, getElementAt, getSize, removeListDataListener
public Object getSelectedItem()
getSelectedItem
in interface ComboBoxModel
public void setSelectedItem(Object selected)
The selection notification process is very much a hack. This fires
a ListDataEvent where the range is between -1 and -1. This is identical
to the notification process used by the DefaultComboBoxModel
.
setSelectedItem
in interface ComboBoxModel
Copyright © 2024 levigo holding gmbh. All rights reserved.