|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel com.isti.util.gui.IstiListComboBoxModel
public class IstiListComboBoxModel
Class IstiListComboBoxModel defines a list combo box model.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
IstiListComboBoxModel(java.util.List objects,
java.lang.Object selectedObject)
Constructs a station combo box model. |
Method Summary | |
---|---|
void |
addElement(java.lang.Object obj)
Adds an item at the end of the model. |
java.lang.Object |
getElementAt(int index)
Gets the value at the specified index. |
java.lang.Object |
getSelectedItem()
Gets the selected item. |
int |
getSize()
Gets the length of the list. |
void |
insertElementAt(java.lang.Object obj,
int index)
Adds an item at a specific index. |
void |
removeAllElements()
Empties the list. |
void |
removeElement(java.lang.Object obj)
Removes an item from the model. |
void |
removeElementAt(int index)
Removes an item at a specific index. |
void |
setSelectedItem(java.lang.Object anItem)
Set the selected item. |
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 IstiListComboBoxModel(java.util.List objects, java.lang.Object selectedObject)
objects
- the list of objects.selectedObject
- the selected object.Method Detail |
---|
public void addElement(java.lang.Object obj)
addElement
in interface javax.swing.MutableComboBoxModel
obj
- the Object
to be addedpublic java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
index
- the requested index.
index
.public java.lang.Object getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
null
if there is no selection.public int getSize()
getSize
in interface javax.swing.ListModel
public void insertElementAt(java.lang.Object obj, int index)
insertElementAt
in interface javax.swing.MutableComboBoxModel
obj
- the Object
to be addedindex
- location to add the objectpublic void removeAllElements()
public void removeElement(java.lang.Object obj)
removeElement
in interface javax.swing.MutableComboBoxModel
obj
- the Object
to be removedpublic void removeElementAt(int index)
ListDataListener
s that the
item has been removed.
removeElementAt
in interface javax.swing.MutableComboBoxModel
index
- location of object to be removedpublic void setSelectedItem(java.lang.Object anItem)
setSelectedItem
in interface javax.swing.ComboBoxModel
anItem
- the selected item or null
for no selection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |