com.ibm.jdg2e.view.files.viewer
Class TimestampSorter

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerComparator
      extended byorg.eclipse.jface.viewers.ViewerSorter
          extended bycom.ibm.jdg2e.view.files.viewer.TimestampSorter

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

Sorts by raw timestamp of resource. This uses the file system timestamp so even if the resource is out of sync with the workspace it will sort to top when requested.


Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
TimestampSorter()
           
 
Method Summary
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object e1, java.lang.Object e2)
          This compare logic swaps the passed values in the return statement to sort from highest to lowest.
 boolean isSorterProperty(java.lang.Object element, java.lang.String property)
           
 boolean isUp()
           
 void setFileSystemSort(boolean b)
           
 void setUp(boolean up)
           
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator, getComparator
 
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampSorter

public TimestampSorter()
Method Detail

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)
This compare logic swaps the passed values in the return statement to sort from highest to lowest.

The string value passed back is the date in milliseconds.

See Also:
ViewerComparator.compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)

isSorterProperty

public boolean isSorterProperty(java.lang.Object element,
                                java.lang.String property)

isUp

public boolean isUp()

setFileSystemSort

public void setFileSystemSort(boolean b)
Parameters:
b -

setUp

public void setUp(boolean up)