net.sourceforge.java.feednread.frontend.components.newstable
Class NewsFeedTableViewerUnreadFilter

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerFilter
      extended bynet.sourceforge.java.feednread.frontend.components.newstable.NewsFeedTableViewerUnreadFilter

public class NewsFeedTableViewerUnreadFilter
extends ViewerFilter

Selects all unread NewsFeedEntry objects, i.e. filters out all read NewsFeedEntry objects.

Author:
Sebastian Machhausen

Constructor Summary
NewsFeedTableViewerUnreadFilter()
           
 
Method Summary
 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.
 
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
 

Constructor Detail

NewsFeedTableViewerUnreadFilter

public NewsFeedTableViewerUnreadFilter()
Method Detail

select

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.

The selection is based on the read status of the NewsFeedEntry element. An unread news element is selected whereas a read news element is rejected.

Parameters:
viewer - the Viewer for which selection is done
parentElement - the parent element
element - the element to potentially select
Returns:
true if the specified element was selected; false it was rejected