com.sodius.mdw.platform.model.viewsupport
Class FilteredViewerSorter

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerComparator
      extended byorg.eclipse.jface.viewers.ViewerSorter
          extended bycom.sodius.mdw.platform.model.viewsupport.FilteredViewerSorter

public abstract class FilteredViewerSorter
extends org.eclipse.jface.viewers.ViewerSorter

A viewer sorter that can states its capability to handle specific elements.

Clients may subclass this class.

Since:
MDWorkbench 3.0.0

Constructor Summary
FilteredViewerSorter()
          Creates a new viewer sorter, which uses the default collator to sort strings.
FilteredViewerSorter(Collator collator)
          Creates a new viewer sorter, which uses the given collator to sort strings.
 
Method Summary
abstract  boolean isEnabledFor(Object element)
          Determines if the sorter is capable to handle the specified element.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator
 
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, compare, isSorterProperty, sort
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredViewerSorter

public FilteredViewerSorter()
Creates a new viewer sorter, which uses the default collator to sort strings.


FilteredViewerSorter

public FilteredViewerSorter(Collator collator)
Creates a new viewer sorter, which uses the given collator to sort strings.

Parameters:
collator - the collator to use to sort strings
Method Detail

isEnabledFor

public abstract boolean isEnabledFor(Object element)
Determines if the sorter is capable to handle the specified element. If not, the compare() method won't be called on such element.

Returns:
true if the sorter can handle the specified element, false otherwise.