org.cafesip.gwtcomp.client.utils
Class StringComparator
java.lang.Object
org.cafesip.gwtcomp.client.utils.StringComparator
- All Implemented Interfaces:
- Comparator<Widget[]>
public class StringComparator
- extends Object
- implements Comparator<Widget[]>
A convenience class for the
SuperTableProperty. The SuperTable
supports sorting of columns but you have to provide the comparator. This is a
ready-made comparator class that you can use to compare columns that are of
the type GWT Label or HTML and needs a simple string comparison. The string
comparison is case-sensitive.
- Author:
- Amit Chatterjee
|
Constructor Summary |
StringComparator(int col,
boolean ascending)
A constructor for this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringComparator
public StringComparator(int col,
boolean ascending)
- A constructor for this class.
- Parameters:
col - Specifies the column index in the table (whether it is column
0, 1 , 2 etc.)ascending - true if ascending comparator, false if this is a descending
comparator.
compare
public int compare(Widget[] o1,
Widget[] o2)
- Specified by:
compare in interface Comparator<Widget[]>
convertToText
protected static String convertToText(Widget w)
Copyright © 2010 Cafesip.org. All Rights Reserved.