com.levigo.util.swing.glazedlists
Class EventComboBoxModel<E>
java.lang.Object
com.levigo.util.swing.glazedlists.EventListModel<E>
com.levigo.util.swing.glazedlists.EventComboBoxModel<E>
- All Implemented Interfaces:
- ListEventListener<E>, EventListener, ComboBoxModel, ListModel
public class EventComboBoxModel<E>
- extends EventListModel<E>
- implements ComboBoxModel
A combo box model for displaying Glazed Lists in a combo box.
The implementation of setSelectedItem(java.lang.Object)
and getSelectedItem()
is not in any way tied to the contents of the list.
- Author:
- Jesse Wilson
- See Also:
- Glazed Lists Tutorial
Constructor Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventComboBoxModel
public 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.
getSelectedItem
public Object getSelectedItem()
- Gets the currently selected item.
- Specified by:
getSelectedItem
in interface ComboBoxModel
setSelectedItem
public void setSelectedItem(Object selected)
- Sets the currently selected item.
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
.
- Specified by:
setSelectedItem
in interface ComboBoxModel
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.