|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
javax.swing.DefaultComboBoxModel
org.jminor.common.model.combobox.ItemComboBoxModel<T>
public class ItemComboBoxModel<T>
A ComboBoxModel implementation based on the ItemComboBoxModel.Item
class.
Nested Class Summary | |
---|---|
static class |
ItemComboBoxModel.IconItem<T>
An IconItem to use in a ItemComboBoxModel. |
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
ItemComboBoxModel()
Constructs a new ItemComboBoxModel. |
|
ItemComboBoxModel(Item<T>... items)
Constructs a new ItemComboBoxModel |
|
ItemComboBoxModel(List<Item<T>> items)
Constructs a new ItemComboBoxModel |
Method Summary | |
---|---|
void |
clear()
Clears all data from this refreshable instance |
int |
getIndexOfItem(Object item)
|
Item<T> |
getSelectedItem()
|
protected void |
initializeItems(List<Item<T>> items)
|
void |
refresh()
Clears the model and adds all the items |
void |
setSelectedItem(Object anObject)
|
Methods inherited from class javax.swing.DefaultComboBoxModel |
---|
addElement, getElementAt, getIndexOf, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, removeListDataListener |
Constructor Detail |
---|
public ItemComboBoxModel()
public ItemComboBoxModel(Item<T>... items)
items
- the itemspublic ItemComboBoxModel(List<Item<T>> items)
items
- the itemsMethod Detail |
---|
public final void setSelectedItem(Object anObject)
setSelectedItem
in interface ComboBoxModel
setSelectedItem
in class DefaultComboBoxModel
public final int getIndexOfItem(Object item)
item
- the item
public final Item<T> getSelectedItem()
getSelectedItem
in interface ComboBoxModel
getSelectedItem
in class DefaultComboBoxModel
public final void clear()
clear
in interface Refreshable
public void refresh()
refresh
in interface Refreshable
protected final void initializeItems(List<Item<T>> items)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |