E - The enum class that backs this list model.public class EnumListModel<E extends Enum> extends AbstractListModel
import com.sptci.echo.list.FilteredEnumListModel;
import com.sptci.echo.list.SelectField;
...
// Type is an enum
final EnumListModel<Type> model = new EnumListModel<Type>( Type.class );
final SelectField<EnumListModel<Type>> select = new SelectField<EnumListModel<Type>>();
select.setModel( model );
© Copyright 2009 Sans Pareil Technologies, Inc.
| Modifier and Type | Field and Description |
|---|---|
protected Class<E> |
enumClass
The enum class that is used as the backing data model.
|
| Constructor and Description |
|---|
EnumListModel(Class<E> cls)
Create a new instance using the specified enum class.
|
| Modifier and Type | Method and Description |
|---|---|
E |
get(int index)
Returns the enumerated contant value at the specified index.
|
int |
size()
Return the total number of contants in the enumeration.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getEventListenerList, removeListDataListenerpublic E get(int index)
index - The index for the constant value.ListModel.get(int)public int size()
ListModel.size()