com.ibm.commons.iloader.node.lookups
Class EnumerationLookup

java.lang.Object
  extended by com.ibm.commons.iloader.node.lookups.api.AbstractLookup
      extended by com.ibm.commons.iloader.node.lookups.EnumerationLookup
All Implemented Interfaces:
ILookup

public class EnumerationLookup
extends com.ibm.commons.iloader.node.lookups.api.AbstractLookup

Provides an enumerated lookup. In this lookup the user provides a list of labels. The code returned by getCode(int) is basically the index provided to the getCode method.


Constructor Summary
EnumerationLookup(java.lang.String[] labels)
          Creates a new instance of this class.
 
Method Summary
 java.lang.String getCode(int index)
          Return the code or model value for this index.
 java.lang.String getLabel(int index)
          Return the label displayed to the user for this index.
 int size()
          Return the number of items in this lookup.
 
Methods inherited from class com.ibm.commons.iloader.node.lookups.api.AbstractLookup
addLookupListener, addNotify, getImage, getLabelFromCode, getLabelFromCodeIgnoreCase, notifyLookupChanged, removeLookupListener, removeNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationLookup

public EnumerationLookup(java.lang.String[] labels)
Creates a new instance of this class.

Parameters:
labels - the labels to appear in the UI
Method Detail

size

public int size()
Description copied from interface: ILookup
Return the number of items in this lookup.


getCode

public java.lang.String getCode(int index)
Description copied from interface: ILookup
Return the code or model value for this index.


getLabel

public java.lang.String getLabel(int index)
Description copied from interface: ILookup
Return the label displayed to the user for this index.