net.sourceforge.java.util.gui.jface.viewers
Class TreeViewerSorter
java.lang.Object
org.eclipse.jface.viewers.ViewerComparator
org.eclipse.jface.viewers.ViewerSorter
net.sourceforge.java.util.gui.jface.viewers.TreeViewerSorter
- public class TreeViewerSorter
- extends ViewerSorter
Default sorter for use in JFace TreeViewer instances based on
ITreeElement structures.
- Author:
- Sebastian Machhausen
|
Method Summary |
int |
category(Object element)
Returns the category of the given element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeViewerSorter
public TreeViewerSorter()
category
public int category(Object element)
Returns the category of the given element. The category is a number used
to allocate elements to bins; the bins are arranged in ascending numeric
order. The elements within a bin are arranged via a second level sort
criterion.
If the specified element is an ITreeElement and allows sub
elements this method returns 0 otherwise 1
as bin number.
- Parameters:
element - the element to get the category bin number for
- Returns:
- the category bin number