diva.gui.toolbox
Class ListDataModel
java.lang.Object
javax.swing.AbstractListModel
javax.swing.DefaultComboBoxModel
diva.gui.toolbox.ListDataModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel
public class ListDataModel
- extends javax.swing.DefaultComboBoxModel
A model that captures the notion of a list of elements with a
single selected element. This is really just a
DefaultComboBoxModel, because that class happens to fit our
requirements. We subclass DefaultComboBoxModel so we can modify it
if any of the behavior should not be quite right.
- Version:
- $Id: ListDataModel.java 38798 2005-07-08 20:00:01Z cxh $
- Author:
- John Reekie
- See Also:
- Serialized Form
- Accepted Rating:
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Method Summary |
boolean |
contains(java.lang.Object o)
Return whether or not the given item is contained
by the model |
java.util.List |
getList()
Return this model as a list. |
java.util.Iterator |
iterator()
Return an iterator over the elements in the model. |
Methods inherited from class javax.swing.DefaultComboBoxModel |
addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem |
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 |
ListDataModel
public ListDataModel()
- Create a new model.
getList
public java.util.List getList()
- Return this model as a list.
iterator
public java.util.Iterator iterator()
- Return an iterator over the elements in the model.
contains
public boolean contains(java.lang.Object o)
- Return whether or not the given item is contained
by the model