Elexis API documentation
Version 2.1.6 as of December 11 2011

de.ralfebert.rcputils.tables.sort
Class SortColumnComparator

java.lang.Object
  extended by ViewerComparator
      extended by de.ralfebert.rcputils.tables.sort.SortColumnComparator

public final class SortColumnComparator
extends ViewerComparator

ColumnComparator is a ViewerComparator that uses table.getSortColumn() as column to compare values. The column is queries for an IValue by the column.getData(SORT_BY) and used this value to sort values. It also pays attention to table.getSortDirection(), if it's DESC (SWT.DOWN), the values are exchanged. Internal implementation class for TableViewerBuilder.

Author:
Ralf Ebert

Field Summary
static java.lang.String SORT_BY
           
 
Constructor Summary
SortColumnComparator()
           
 
Method Summary
 int compare(Viewer viewer, java.lang.Object e1, java.lang.Object e2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SORT_BY

public static final java.lang.String SORT_BY
Constructor Detail

SortColumnComparator

public SortColumnComparator()
Method Detail

compare

public int compare(Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis