info.joseluismartin.gui.list
Class ListComboBoxModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by info.joseluismartin.gui.list.ListListModel
          extended by info.joseluismartin.gui.list.ListComboBoxModel
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel, MutableComboBoxModel

public class ListComboBoxModel
extends ListListModel
implements MutableComboBoxModel

A ComboBoxModel that use a List as Container

Author:
Jose Luis Martin - (jlm@joseluismartin.info)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ListComboBoxModel()
           
ListComboBoxModel(List list)
           
ListComboBoxModel(List list, boolean allowNullSelection)
           
 
Method Summary
 void addElement(Object obj)
           
 Object getSelectedItem()
           
 void insertElementAt(Object obj, int index)
           
 void removeElement(Object obj)
           
 void removeElementAt(int index)
           
 void setSelectedItem(Object item)
           
 
Methods inherited from class info.joseluismartin.gui.list.ListListModel
addAll, clear, getElementAt, getList, getSize, removeAll, setList
 
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, getElementAt, getSize, removeListDataListener
 

Constructor Detail

ListComboBoxModel

public ListComboBoxModel()

ListComboBoxModel

public ListComboBoxModel(List list)

ListComboBoxModel

public ListComboBoxModel(List list,
                         boolean allowNullSelection)
Method Detail

addElement

public void addElement(Object obj)
Specified by:
addElement in interface MutableComboBoxModel

insertElementAt

public void insertElementAt(Object obj,
                            int index)
Specified by:
insertElementAt in interface MutableComboBoxModel

removeElement

public void removeElement(Object obj)
Specified by:
removeElement in interface MutableComboBoxModel

removeElementAt

public void removeElementAt(int index)
Specified by:
removeElementAt in interface MutableComboBoxModel

getSelectedItem

public Object getSelectedItem()
Specified by:
getSelectedItem in interface ComboBoxModel

setSelectedItem

public void setSelectedItem(Object item)
Specified by:
setSelectedItem in interface ComboBoxModel


Copyright © 2013 JDAL. All Rights Reserved.