org.eclipse.mylar.internal.tasks.ui.planner
Class TaskActivitySorter

java.lang.Object
  extended by org.eclipse.jface.viewers.ViewerComparator
      extended by org.eclipse.jface.viewers.ViewerSorter
          extended by org.eclipse.mylar.internal.tasks.ui.planner.TaskActivitySorter
Direct Known Subclasses:
TaskPlanSorter

public class TaskActivitySorter
extends org.eclipse.jface.viewers.ViewerSorter

Author:
Ken Sueda, Mik Kersten

Field Summary
static int COMPLETED_DATE
           
static int CREATION_DATE
           
private  int criteria
           
static int DESCRIPTION
           
static int DURATION
           
static int ESTIMATED
           
static int ICON
           
static int PRIORITY
           
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
TaskActivitySorter(int criteria)
           
 
Method Summary
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object obj1, java.lang.Object obj2)
           
protected  int compareCompletedDate(ITask task1, ITask task2)
           
protected  int compareCreationDate(ITask task1, ITask task2)
           
protected  int compareDescription(ITask task1, ITask task2)
           
protected  int compareDuration(ITask task1, ITask task2)
           
protected  int compareEstimated(ITask task1, ITask task2)
           
protected  int comparePriority(ITask task1, ITask task2)
           
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator, getComparator
 
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, isSorterProperty, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION

public static final int DESCRIPTION
See Also:
Constant Field Values

PRIORITY

public static final int PRIORITY
See Also:
Constant Field Values

CREATION_DATE

public static final int CREATION_DATE
See Also:
Constant Field Values

COMPLETED_DATE

public static final int COMPLETED_DATE
See Also:
Constant Field Values

DURATION

public static final int DURATION
See Also:
Constant Field Values

ESTIMATED

public static final int ESTIMATED
See Also:
Constant Field Values

ICON

public static final int ICON
See Also:
Constant Field Values

criteria

private int criteria
Constructor Detail

TaskActivitySorter

public TaskActivitySorter(int criteria)
Method Detail

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object obj1,
                   java.lang.Object obj2)
Overrides:
compare in class org.eclipse.jface.viewers.ViewerComparator

compareDescription

protected int compareDescription(ITask task1,
                                 ITask task2)

comparePriority

protected int comparePriority(ITask task1,
                              ITask task2)

compareCompletedDate

protected int compareCompletedDate(ITask task1,
                                   ITask task2)

compareEstimated

protected int compareEstimated(ITask task1,
                               ITask task2)

compareCreationDate

protected int compareCreationDate(ITask task1,
                                  ITask task2)

compareDuration

protected int compareDuration(ITask task1,
                              ITask task2)