at.tuwien.ifs.commons.models
Class ClassComboBoxModel<A>

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by at.tuwien.ifs.commons.models.ClassComboBoxModel<A>
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel

public class ClassComboBoxModel<A>
extends AbstractListModel
implements ComboBoxModel, Serializable

Version:
$Id: ClassComboBoxModel.java 3867 2010-10-21 15:50:10Z mayer $
Author:
Jakob Frank
See Also:
Serialized Form

Field Summary
private  List<Class<? extends A>> content
           
private  int selectedIndex
           
private static long serialVersionUID
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ClassComboBoxModel(Class<? extends A>[] content)
           
ClassComboBoxModel(List<Class<? extends A>> content)
           
 
Method Summary
 Class<? extends A> getClassAt(int index)
           
 Object getElementAt(int index)
           
 Class<? extends A> getSelectedClass()
           
 String getSelectedItem()
           
 int getSize()
           
 void setSelectedItem(Object anItem)
           
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

content

private final List<Class<? extends A>> content

selectedIndex

private int selectedIndex
Constructor Detail

ClassComboBoxModel

public ClassComboBoxModel(List<Class<? extends A>> content)

ClassComboBoxModel

public ClassComboBoxModel(Class<? extends A>[] content)
Method Detail

getSelectedItem

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

getSelectedClass

public Class<? extends A> getSelectedClass()

setSelectedItem

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

getElementAt

public Object getElementAt(int index)
Specified by:
getElementAt in interface ListModel

getClassAt

public Class<? extends A> getClassAt(int index)

getSize

public int getSize()
Specified by:
getSize in interface ListModel