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.useViewerComparatorinstead.A viewer sorter is used by aStructuredViewerto reorder the elements provided by its content provider.The default
comparemethod 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
isSorterPropertymethod; they may reimplement thecategorymethod to provide categorization; and they may override thecomparemethods to provide a totally different way of sorting elements.- See Also:
IStructuredContentProvider,StructuredViewer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.text.CollatorcollatorDeprecated.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(java.text.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 java.text.CollatorgetCollator()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 java.text.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(java.text.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 java.text.Collator getCollator()
Deprecated.as of 3.3 UseViewerComparator.getComparator()Returns the collator used to sort strings.- Returns:
- the collator used to sort strings
-
-