|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.croftsoft.core.gui.table.RowSortComparator
public final class RowSortComparator
Sorts rows based upon comparison of elements within a column.
Constructor Summary | |
---|---|
RowSortComparator()
Convenience constructor. |
|
RowSortComparator(int index,
boolean reverse)
Main constructor. |
Method Summary | |
---|---|
int |
compare(Object o1,
Object o2)
Compares two rows based upon column values. |
void |
setIndex(int index)
The column index on which the rows are to be sorted. |
void |
setReverse(boolean reverse)
Reverses the sort order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public RowSortComparator(int index, boolean reverse)
public RowSortComparator()
this ( 0, false );
Method Detail |
---|
public void setIndex(int index)
public void setReverse(boolean reverse)
public int compare(Object o1, Object o2)
The row arguments should implement the java.util.List interface. Row elements must implement the java.util.Comparable interface.
compare
in interface Comparator
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |