| java.lang.Object net.mygwt.ui.client.viewer.ViewerSorter
ViewerSorter | public class ViewerSorter (Code) | | A viewer sorter is used by a Viewer to reorder the elements
provided by its content provider.
|
Constructor Summary | |
public | ViewerSorter() Creates a new instance that uses a DefaultComparator . | public | ViewerSorter(Comparator comparator) Creates a new sorter instance with the given comparator. |
Method Summary | |
public int | compare(Viewer viewer, Object e1, Object e2) Returns a negative, zero, or positive number depending on whether the first
element is less than, equal to, or greater than the second element. | public void | sort(Viewer viewer, Object[] elements) Sorts the given elements in-place, modifying the given array. |
ViewerSorter | public ViewerSorter()(Code) | | Creates a new instance that uses a DefaultComparator .
|
ViewerSorter | public ViewerSorter(Comparator comparator)(Code) | | Creates a new sorter instance with the given comparator.
Parameters: comparator - the sorter comparator |
compare | public int compare(Viewer viewer, Object e1, Object e2)(Code) | | Returns a negative, zero, or positive number depending on whether the first
element is less than, equal to, or greater than the second element.
Parameters: viewer - the viewer Parameters: e1 - the first element Parameters: e2 - the second element a negative number if the first element is less than the secondelement; the value 0 if the first element is equalto the second element; and a positive number if the first elementis greater than the second element |
sort | public void sort(Viewer viewer, Object[] elements)(Code) | | Sorts the given elements in-place, modifying the given array.
Parameters: viewer - the viewer Parameters: elements - the elemnts to sort |
|
|