|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.iloader.node.lookups.api.AbstractLookup com.ibm.commons.iloader.node.lookups.ListLookup
public class ListLookup
A lookup that can be used in conjunction with a list of objects. getCode(int)
and getLabel(int)
call helper methods which are given the object from the list and asked to return a code and a label for the object.
Constructor Summary | |
---|---|
ListLookup(java.util.List list)
Creates a new instance of this class. |
Method Summary | |
---|---|
java.lang.String |
getCode(int index)
Return the code or model value for this index. |
protected java.lang.String |
getCode(java.util.List list,
int index,
java.lang.Object o)
Returns a code based on an object at a certain index in the list. |
java.lang.String |
getLabel(int index)
Return the label displayed to the user for this index. |
protected java.lang.String |
getLabel(java.util.List list,
int index,
java.lang.Object o)
Returns a label based on an object at a certain index in the list. |
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 |
---|
public ListLookup(java.util.List list)
list
- the list of objects we wish to display in the lookupMethod Detail |
---|
public int size()
ILookup
public java.lang.String getCode(int index)
ILookup
protected java.lang.String getCode(java.util.List list, int index, java.lang.Object o)
o.toString()
list
- the list that the lookup is based onindex
- the index of the item in the list that is being looked upo
- the object that was returned for the index provided
public java.lang.String getLabel(int index)
ILookup
protected java.lang.String getLabel(java.util.List list, int index, java.lang.Object o)
o.toString()
list
- the list that the lookup is based onindex
- the index of the item in the list that is being looked upo
- the object that was returned for the index provided
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |