net.sf.beanform.util
Class EnumPropertySelectionModel<T extends Enum<T>>

java.lang.Object
  extended by net.sf.beanform.util.EnumPropertySelectionModel<T>
All Implemented Interfaces:
IPropertySelectionModel

public class EnumPropertySelectionModel<T extends Enum<T>>
extends Object
implements IPropertySelectionModel

A generic IPropertySelectionModel implementation for enumerations.

Author:
Daniel Gredler

Constructor Summary
EnumPropertySelectionModel(Class<T> type, boolean includeEmptyOption, org.apache.hivemind.Messages messages)
           
 
Method Summary
 String getLabel(int index)
           
 Object getOption(int index)
           
 int getOptionCount()
           
 String getValue(int index)
           
 Object translateValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumPropertySelectionModel

public EnumPropertySelectionModel(Class<T> type,
                                  boolean includeEmptyOption,
                                  org.apache.hivemind.Messages messages)
Method Detail

getOptionCount

public int getOptionCount()
Specified by:
getOptionCount in interface IPropertySelectionModel

getOption

public Object getOption(int index)
Specified by:
getOption in interface IPropertySelectionModel

getLabel

public String getLabel(int index)
Specified by:
getLabel in interface IPropertySelectionModel

getValue

public String getValue(int index)
Specified by:
getValue in interface IPropertySelectionModel

translateValue

public Object translateValue(String value)
Specified by:
translateValue in interface IPropertySelectionModel


Copyright © 2006 Daniel Gredler. All Rights Reserved.