org.springframework.richclient.list
Class ComboBoxListModelAdapter

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.springframework.richclient.list.AbstractFilteredListModel
          extended by org.springframework.richclient.list.ComboBoxListModelAdapter
All Implemented Interfaces:
Serializable, EventListener, ComboBoxModel, ListDataListener, ListModel

public class ComboBoxListModelAdapter
extends AbstractFilteredListModel
implements ComboBoxModel

Simple adapter to create a ComboBoxModel from an existing ListModel

Author:
Mathias Broekelmann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.richclient.list.AbstractFilteredListModel
filteredModel, logger
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ComboBoxListModelAdapter(ListModel listModel)
          Constructs a new instance with a given listModel
 
Method Summary
 Object getSelectedItem()
           
 void setSelectedItem(Object anItem)
           
 
Methods inherited from class org.springframework.richclient.list.AbstractFilteredListModel
contentsChanged, getElementAt, getElementIndex, getFilteredModel, getSize, intervalAdded, intervalRemoved, setFilteredModel
 
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

ComboBoxListModelAdapter

public ComboBoxListModelAdapter(ListModel listModel)
Constructs a new instance with a given listModel

Parameters:
listModel - the listmodel containing the elements
Throws:
IllegalArgumentException - if listModel is null
Method Detail

getSelectedItem

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

setSelectedItem

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


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.