net.sourceforge.java.util.gui.jface.viewers
Class NodeViewerFilter

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerFilter
      extended bynet.sourceforge.java.util.gui.jface.viewers.NodeViewerFilter

public class NodeViewerFilter
extends ViewerFilter

Filters all ITreeElements that allow sub elements. Supplementally a single ITreeElement can be specified which should always be filtered out.

Author:
Sebastian Machhausen

Field Summary
private  ITreeElement excludedElement
           The ITreeElement that is always filtered out
 
Constructor Summary
NodeViewerFilter(ITreeElement excludedElement)
           Creates a new NodeViewerFilter instance.
 
Method Summary
 boolean select(Viewer viewer, Object parentElement, Object element)
           Returns whether the given element makes it through this filter.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerFilter
filter, filter, isFilterProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

excludedElement

private ITreeElement excludedElement

The ITreeElement that is always filtered out

Constructor Detail

NodeViewerFilter

public NodeViewerFilter(ITreeElement excludedElement)

Creates a new NodeViewerFilter instance.

Parameters:
excludedElement - an ITreeElement which should be always filtered out
Method Detail

select

public boolean select(Viewer viewer,
                      Object parentElement,
                      Object element)

Returns whether the given element makes it through this filter.

Parameters:
viewer - the viewer
parentElement - the parent element
element - the element
Returns:
true if element is included in the filtered set, and false if excluded
See Also:
ViewerFilter.select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)