com.ibm.jdg2e.view.simplemodel.viewer
Class PoliticalSorter

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerSorter
      extended bycom.ibm.jdg2e.view.simplemodel.viewer.PoliticalSorter

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

Added to viewer on request to force alphabetical sort of the location within the different political units. The sort is based on the first column, and this is not a modifiable attribute. This is why there is no implementation of the isSorterProperty method.


Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
PoliticalSorter()
           
 
Method Summary
 int category(java.lang.Object element)
          Categorizes the ILocation objects using their political unit value.
 boolean isSorterProperty(java.lang.Object element, java.lang.String property)
          Respond true when the property involved is name.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
compare, getCollator, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoliticalSorter

public PoliticalSorter()
Method Detail

category

public int category(java.lang.Object element)
Categorizes the ILocation objects using their political unit value. This is simple to do as this value is already an int value, which is what must be returned.

See Also:
ViewerSorter.category(java.lang.Object)

isSorterProperty

public boolean isSorterProperty(java.lang.Object element,
                                java.lang.String property)
Respond true when the property involved is name.

See Also:
ViewerSorter.isSorterProperty(java.lang.Object, java.lang.String)