|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.viewers.ViewerFilter
org.eclipse.ui.dialogs.PatternFilter
A filter used in conjunction with FilteredTree. In order to
determine if a node should be filtered it uses the content provider of the
tree to do pattern matching on its children. This causes the entire tree
structure to be realized.
Note: this API is experimental and may change before 3.2 M5
FilteredTree| Constructor Summary | |
|---|---|
PatternFilter()
|
|
| Method Summary | |
|---|---|
Object[] |
filter(Viewer viewer,
Object parent,
Object[] elements)
Filters the given elements for the given viewer. |
protected boolean |
isElementMatch(Viewer viewer,
Object element)
Answers whether the given element in the given viewer matches the filter pattern. |
protected boolean |
isElementSelectable(Object element)
Answers whether the given element is a valid selection in the filtered tree. |
protected boolean |
match(String string)
Answers whether the given String matches the pattern. |
boolean |
select(Viewer viewer,
Object parentElement,
Object element)
Returns whether the given element makes it through this filter. |
void |
setIncludeLeadingWildcard(boolean includeLeadingWildcard)
Sets whether a leading wildcard should be attached to each pattern string. |
void |
setPattern(String patternString)
The pattern string for which this filter should select elements in the viewer. |
| Methods inherited from class org.eclipse.jface.viewers.ViewerFilter |
|---|
filter, isFilterProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PatternFilter()
| Method Detail |
public Object[] filter(Viewer viewer,
Object parent,
Object[] elements)
ViewerFilter
The default implementation of this method calls
select on each element in the array,
and returns only those elements for which select
returns true.
filter in class ViewerFilterviewer - the viewerparent - the parent elementelements - the elements to filter
public boolean select(Viewer viewer,
Object parentElement,
Object element)
ViewerFilter
select in class ViewerFilterviewer - the viewerparentElement - the parent elementelement - the element
true if element is included in the
filtered set, and false if excludedpublic final void setIncludeLeadingWildcard(boolean includeLeadingWildcard)
includeLeadingWildcard - Whether a leading wildcard should be added.public void setPattern(String patternString)
patternString - protected boolean match(String string)
string - the String to test
protected boolean isElementSelectable(Object element)
element -
protected boolean isElementMatch(Viewer viewer,
Object element)
viewer - the tree viewer in which the element resideselement - the element in the tree to check for a match
|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.