|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.commons.iloader.node.lookups.api.AbstractLookup
com.ibm.commons.iloader.node.lookups.FilteredLookup
public class FilteredLookup
This lookup provides a mechanism for providing a filter on the lookup. The lookup items are filtered based on an input. The indices are modified to reflect the items filtered out.
| Nested Class Summary | |
|---|---|
static interface |
FilteredLookup.Filter
A filter interface that determines whether an item at a certain index should be accepted or not. |
static class |
FilteredLookup.PrefixFilter
|
| Constructor Summary | |
|---|---|
FilteredLookup(ILookup wrapped,
FilteredLookup.Filter filter)
Creates a new instance of this class with an associated Filter. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCode(int index)
Return the code or model value for this index. |
FilteredLookup.Filter |
getFilter()
Returns the filter in use by lookup. |
org.eclipse.swt.graphics.Image |
getImage(int index)
Return the image for the given index. |
java.lang.String |
getLabel(int index)
Return the label displayed to the user for this index. |
java.lang.String |
getLabelFromCode(java.lang.String code)
Return the label for the given model value code. |
void |
refresh()
Refresh the content of the lookup. |
void |
setFilter(FilteredLookup.Filter filter)
Set a filter to filter the lookup with. |
int |
size()
Return the number of items in this lookup. |
| Methods inherited from class com.ibm.commons.iloader.node.lookups.api.AbstractLookup |
|---|
addLookupListener, addNotify, 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 FilteredLookup(ILookup wrapped,
FilteredLookup.Filter filter)
wrapped - the lookup that we would filterfilter - the filter to apply to the lookup| Method Detail |
|---|
public FilteredLookup.Filter getFilter()
public void setFilter(FilteredLookup.Filter filter)
filter - public void refresh()
public int size()
ILookup
public java.lang.String getCode(int index)
ILookup
public java.lang.String getLabel(int index)
ILookup
public java.lang.String getLabelFromCode(java.lang.String code)
ILookup
getLabelFromCode in interface ILookupgetLabelFromCode in class com.ibm.commons.iloader.node.lookups.api.AbstractLookuppublic org.eclipse.swt.graphics.Image getImage(int index)
ILookup
getImage in interface ILookupgetImage in class com.ibm.commons.iloader.node.lookups.api.AbstractLookup
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||