|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.zeus.ui.table.sort.TableSorter
public final class TableSorter
JTable sorter. Original code from: http://www.senun.com/Left/Programming/Java_old/Examples_swing/SwingExamples.html
Constructor Summary | |
---|---|
TableSorter(SortableTableModel model)
Constructor. |
Method Summary | |
---|---|
int |
compare(java.lang.Boolean o1,
java.lang.Boolean o2)
Compares two boolean values. |
int |
compare(java.util.Date o1,
java.util.Date o2)
Compares two dates. |
int |
compare(int column,
int row1,
int row2)
Comparaters. |
int |
compare(java.lang.Number o1,
java.lang.Number o2)
Compares two numbers for higher or lower values. |
void |
sort(int column,
boolean isAscent)
n2 selection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableSorter(SortableTableModel model)
model
- Instance of SortableTableModel
.Method Detail |
---|
public void sort(int column, boolean isAscent)
column
- The column to sort.isAscent
- Check if ascending.public int compare(int column, int row1, int row2)
column
- The column number.row1
- The first row number to compare.row2
- The second row number to compare.
public int compare(java.lang.Number o1, java.lang.Number o2)
o1
- The first Number
.o2
- The second Number
.
public int compare(java.util.Date o1, java.util.Date o2)
o1
- The first Date
.o2
- The second Date
.
public int compare(java.lang.Boolean o1, java.lang.Boolean o2)
boolean
values.
o1
- The first Boolean
.o2
- The second Boolean
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |