de.matthiasmann.twl.model
Class EnumListModel<T extends java.lang.Enum<T>>

java.lang.Object
  extended by de.matthiasmann.twl.model.AbstractListModel<T>
      extended by de.matthiasmann.twl.model.SimpleListModel<T>
          extended by de.matthiasmann.twl.model.EnumListModel<T>
All Implemented Interfaces:
ListModel<T>

public class EnumListModel<T extends java.lang.Enum<T>>
extends SimpleListModel<T>

A read only list model containing all enum values of the specified enum.


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.model.ListModel
ListModel.ChangeListener
 
Constructor Summary
EnumListModel(java.lang.Class<T> enumClass)
           
 
Method Summary
 int findEntry(T value)
           
 T getEntry(int index)
           
 java.lang.Class<T> getEnumClass()
           
 int getNumEntries()
           
 
Methods inherited from class de.matthiasmann.twl.model.SimpleListModel
getEntryTooltip, matchPrefix
 
Methods inherited from class de.matthiasmann.twl.model.AbstractListModel
addChangeListener, fireAllChanged, fireEntriesChanged, fireEntriesDeleted, fireEntriesInserted, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumListModel

public EnumListModel(java.lang.Class<T> enumClass)
Method Detail

getEnumClass

public java.lang.Class<T> getEnumClass()

getEntry

public T getEntry(int index)

getNumEntries

public int getNumEntries()

findEntry

public int findEntry(T value)