|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jface.viewers.ViewerFilter
net.sourceforge.java.util.gui.jface.viewers.TreeViewerFilter
ViewerFilter implementation to filter a
TreeViewer displaying an ITreeElement structure
based on a arbitrary keyword.
| Field Summary | |
private String |
filterText
The filter text. |
private TreeViewer |
viewer
The TreeViewer that is being filtered |
| Constructor Summary | |
TreeViewerFilter(TreeViewer viewer)
Creates a new TreeViewFilter for the specified
TreeViewer.
|
|
| Method Summary | |
Object[] |
filter(Viewer viewer,
Object parent,
Object[] elements)
Filters the given elements for the given viewer. |
String |
getFilterText()
Gets the filter text. |
boolean |
select(Viewer viewer,
Object parentElement,
Object element)
Decides whether or not the element in the
parentElement structure displayed in the specified
Viewer has to be selected.
|
void |
setFilterText(String filterText)
Sets the filter text to the specified value. |
private void |
updateFilterTag(Object element)
Updates the IFilterTag of the specified element depending
on the filter status.
|
| 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 |
| Field Detail |
private TreeViewer viewer
The TreeViewer that is being filtered
private String filterText
The filter text. null or an empty String
indicates no filtering
| Constructor Detail |
public TreeViewerFilter(TreeViewer viewer)
Creates a new TreeViewFilter for the specified
TreeViewer.
viewer - the TreeViewer to create the
TreeViewFilter for| Method Detail |
public Object[] filter(Viewer viewer,
Object parent,
Object[] elements)
Filters the given elements for the given viewer. The input array is not
modified. The default implementation of this method calls
select on each element in the array, and returns only
those elements for which select returns true.
viewer - the Viewer to filterparent - the parent elementelements - the elements to filter
public boolean select(Viewer viewer,
Object parentElement,
Object element)
Decides whether or not the element in the
parentElement structure displayed in the specified
Viewer has to be selected.
viewer - the Viewer for which selection is doneparentElement - the parent elementelement - the element to potentially select
true if the specified element was
selected; false if it was rejectedprivate void updateFilterTag(Object element)
Updates the IFilterTag of the specified element depending
on the filter status.
element - the element to update the filter status forpublic String getFilterText()
Gets the filter text.
null or an empty
String indicates no filtering, i.e. disabled filteringpublic void setFilterText(String filterText)
Sets the filter text to the specified value.
filterText - the filter text to set; null or an empty
String for no filtering, i.e. disabled filtering
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||