Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Class ViewerSorter


java.lang.Object
  extended by 

org.eclipse.jface.viewers.ViewerComparator
      extended by 
org.eclipse.jface.viewers.ViewerSorter
Direct Known Subclasses:
ResourceSorter, TreePathViewerSorter, WorkbenchViewerSorter

public class ViewerSorter
extends ViewerComparator

A viewer sorter is used by a StructuredViewer 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 from category. 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 via ILabelProvider.getText.

Subclasses may implement the isSorterProperty method; they may reimplement the category method to provide categorization; and they may override the compare methods to provide a totally different way of sorting elements.

It is recommended to use ViewerComparator instead.

See Also:
IStructuredContentProvider, StructuredViewer

Field Summary
protected   Collator collator
          Deprecated. as of 3.3 Use ViewerComparator.getComparator()
 
Constructor Summary
ViewerSorter ()
          Creates a new viewer sorter, which uses the default collator to sort strings.
ViewerSorter ( Collator collator)
          Creates a new viewer sorter, which uses the given collator to sort strings.
 
Method Summary
  Collator getCollator ()
          Deprecated. as of 3.3 Use ViewerComparator.getComparator()
 
Methods inherited from class org.eclipse.jface.viewers. ViewerComparator
category, compare, getComparator, isSorterProperty, sort
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collator

protected 
Collator collator
Deprecated. as of 3.3 Use ViewerComparator.getComparator()
The collator used to sort strings.

Constructor Detail

ViewerSorter

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


ViewerSorter

public ViewerSorter(
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

getCollator

public 
Collator getCollator()
Deprecated. as of 3.3 Use ViewerComparator.getComparator()

Returns the collator used to sort strings.

Returns:
the collator used to sort strings

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire