org.tbee.swing.list
Class ArrayListComboBoxModel<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.tbee.swing.list.ArrayListModel<T>
                  extended by org.tbee.swing.list.ArrayListComboBoxModel<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess, javax.swing.ComboBoxModel, javax.swing.ListModel

public class ArrayListComboBoxModel<T>
extends ArrayListModel<T>
implements javax.swing.ComboBoxModel

This class extends ArrayListModel to support a collection as a model for a JComboBox

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tbee.swing.list.ArrayListModel
listDataListeners
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ArrayListComboBoxModel()
           
ArrayListComboBoxModel(java.util.Collection<T> c)
           
ArrayListComboBoxModel(int initialCapacity)
           
 
Method Summary
 T getSelectedItem()
          Implements the method in the ComboBoxModel interface
 void setSelectedItem(java.lang.Object item)
          Implements the method in the ComboBoxModel interface
 
Methods inherited from class org.tbee.swing.list.ArrayListModel
add, add, addAll, addListDataListener, clear, fireIntervalAdded, fireIntervalRemoved, fireIntervalUpdated, getElementAt, getSelectedValues, getSelectedValues, getSize, remove, remove, removeAll, removeListDataListener, removeRange, retainAll, set
 
Methods inherited from class java.util.ArrayList
addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, subList
 

Constructor Detail

ArrayListComboBoxModel

public ArrayListComboBoxModel()

ArrayListComboBoxModel

public ArrayListComboBoxModel(java.util.Collection<T> c)

ArrayListComboBoxModel

public ArrayListComboBoxModel(int initialCapacity)
Method Detail

getSelectedItem

public T getSelectedItem()
Implements the method in the ComboBoxModel interface

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
Returns:
Object
See Also:
ComboBoxModel.getSelectedItem()

setSelectedItem

public void setSelectedItem(java.lang.Object item)
Implements the method in the ComboBoxModel interface

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
See Also:
ComboBoxModel.setSelectedItem(java.lang.Object)


Copyright © 2010. All Rights Reserved.