Package org.eclipse.jface.viewers
Class ViewerSorter
- java.lang.Object
-
- org.eclipse.jface.viewers.ViewerComparator
-
- org.eclipse.jface.viewers.ViewerSorter
-
- Direct Known Subclasses:
ResourceSorter
,TreePathViewerSorter
,WorkbenchViewerSorter
@Deprecated public class ViewerSorter extends ViewerComparator
Deprecated.useViewerComparator
instead.A viewer sorter is used by aStructuredViewer
to reorder the elements provided by its content provider.The default
compare
method compares elements using two steps. The first step uses the values returned fromcategory
. By default, all elements are in the same category. The second level is based on a case insensitive compare of the strings obtained from the content viewer's label provider viaILabelProvider.getText
.Subclasses may implement the
isSorterProperty
method; they may reimplement thecategory
method to provide categorization; and they may override thecompare
methods to provide a totally different way of sorting elements.- See Also:
IStructuredContentProvider
,StructuredViewer
-
-
Field Summary
Fields Modifier and Type Field Description protected Collator
collator
Deprecated.as of 3.3 UseViewerComparator.getComparator()
-
Constructor Summary
Constructors Constructor Description ViewerSorter()
Deprecated.Creates a new viewer sorter, which uses the default collator to sort strings.ViewerSorter(Collator collator)
Deprecated.Creates a new viewer sorter, which uses the given collator to sort strings.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Collator
getCollator()
Deprecated.as of 3.3 UseViewerComparator.getComparator()
-
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, compare, getComparator, isSorterProperty, sort
-
-
-
-
Field Detail
-
collator
@Deprecated protected Collator collator
Deprecated.as of 3.3 UseViewerComparator.getComparator()
The collator used to sort strings.
-
-
Constructor Detail
-
ViewerSorter
public ViewerSorter()
Deprecated.Creates a new viewer sorter, which uses the default collator to sort strings.
-
ViewerSorter
public ViewerSorter(Collator collator)
Deprecated.Creates a new viewer sorter, which uses the given collator to sort strings.- Parameters:
collator
- the collator to use to sort strings
-
-
Method Detail
-
getCollator
@Deprecated public Collator getCollator()
Deprecated.as of 3.3 UseViewerComparator.getComparator()
Returns the collator used to sort strings.- Returns:
- the collator used to sort strings
-
-