|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.swt.widgets.Widget
|
+--org.eclipse.swt.widgets.Control
|
+--org.eclipse.swt.widgets.Scrollable
|
+--org.eclipse.swt.widgets.Composite
|
+--org.eclipse.ui.dialogs.FilteredList
A composite widget which holds a list of elements for user selection. The elements are sorted alphabetically. Optionally, the elements can be filtered and duplicate entries can be hidden (folding).
| Nested Class Summary | |
static interface |
FilteredList.FilterMatcher
|
| Field Summary |
| Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
| Constructor Summary | |
FilteredList(Composite parent,
int style,
ILabelProvider renderer,
boolean ignoreCase,
boolean allowDuplicates,
boolean matchEmptyString)
Constructs a new instance of a filtered list. |
|
| Method Summary | |
void |
addSelectionListener(SelectionListener listener)
Adds a selection listener to the list. |
String |
getFilter()
Returns the filter pattern. |
Object[] |
getFoldedElements(int index)
Returns all elements which are folded together to one entry in the list. |
Object[] |
getSelection()
Returns an array of the selected elements. |
int |
getSelectionIndex()
Returns the selection of the list. |
int[] |
getSelectionIndices()
Returns the selection of the list. |
boolean |
isEmpty()
Tests if the list (before folding and filtering) is empty. |
void |
removeSelectionListener(SelectionListener listener)
Removes a selection listener from the list. |
void |
setComparator(Comparator comparator)
Sets a custom comparator for sorting the list. |
void |
setElements(Object[] elements)
Sets the list of elements. |
void |
setFilter(String filter)
Sets the filter pattern. |
void |
setFilterMatcher(FilteredList.FilterMatcher filterMatcher)
Sets the filter matcher. |
void |
setSelection(int[] selection)
Sets the selection of the list. |
void |
setSelection(Object[] elements)
Sets the selection of the list. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getStyle, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FilteredList(Composite parent,
int style,
ILabelProvider renderer,
boolean ignoreCase,
boolean allowDuplicates,
boolean matchEmptyString)
parent - the parent composite.style - the widget style.renderer - the label renderer.ignoreCase - specifies whether sorting and folding is case sensitive.allowDuplicates - specifies whether folding of duplicates is desired.matchEmptyString - specifies whether empty filter strings should filter everything or nothing.| Method Detail |
public void setElements(Object[] elements)
elements - the elements to be shown in the list.public boolean isEmpty()
true if the list is empty, false otherwise.public void setFilterMatcher(FilteredList.FilterMatcher filterMatcher)
public void setComparator(Comparator comparator)
public void addSelectionListener(SelectionListener listener)
listener - the selection listener to be added.public void removeSelectionListener(SelectionListener listener)
listener - the selection listener to be removed.public void setSelection(int[] selection)
selection - an array of indices specifying the selection.public int[] getSelectionIndices()
public int getSelectionIndex()
getSelectionIndices().
public void setSelection(Object[] elements)
elements - the array of elements to be selected.public Object[] getSelection()
setElements. The array does not contain the rendered strings.
public void setFilter(String filter)
filter - the filter pattern.public String getFilter()
public Object[] getFoldedElements(int index)
index - the index selecting the entry in the list.
null if index is out of range.
|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||