|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
de.desy.acop.displayers.selector.AcopComboBoxModel<T>
public class AcopComboBoxModel<T>
AcopComboBoxModel is an implementation of the ListModel
which allows adding multiple items at once. This model can only work with String
objects.
| Field Summary |
|---|
| Fields inherited from class javax.swing.AbstractListModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
AcopComboBoxModel(java.lang.Class<T> type)
Constructs an empty DefaultComboBoxModel object. |
|
| Method Summary | |
|---|---|
boolean |
contains(java.lang.Object o)
Checks if this model containes the given object. |
java.lang.Object |
getElementAt(int index)
|
T[] |
getElements()
Returns all elements in the model. |
T |
getSelectedItem()
|
int |
getSize()
|
protected void |
removeAllElements()
Empties the list. |
void |
replaceElement(int index,
T newItem)
Replaces an element at the specified index. |
void |
setElements(T[] obj)
Sets new elements to this model. |
void |
setSelectedItem(java.lang.Object anObject)
Set the value of 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 AcopComboBoxModel(java.lang.Class<T> type)
| Method Detail |
|---|
public void setSelectedItem(java.lang.Object anObject)
setSelectedItem in interface javax.swing.ComboBoxModelanObject - The combo box value or null for no selection.public T getSelectedItem()
getSelectedItem in interface javax.swing.ComboBoxModelpublic int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getElementAt(int index)
getElementAt in interface javax.swing.ListModelpublic void setElements(T[] obj)
obj - new elementspublic T[] getElements()
protected void removeAllElements()
public void replaceElement(int index,
T newItem)
index - the index the element should be replaced atnewItem - the replacement elementpublic boolean contains(java.lang.Object o)
o - the object that existance should be checked for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||