Package ucar.ui.table
Class RowSorterAbstract
- java.lang.Object
-
- ucar.ui.table.RowSorterAbstract
-
- All Implemented Interfaces:
RowSorter
public abstract class RowSorterAbstract extends Object implements RowSorter
Superclass for implementations of RowSorter, used with JTreeTableSorted to create application-controlled sorting.- See Also:
TreeTableModelSorted,RowSorter
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]columnNamesprotected TreeTableModelSortedmodelprotected intncolumnsprotected ArrayListrowListprotected int[]sortNextprotected JTreeTableSortedtable
-
Constructor Summary
Constructors Modifier Constructor Description protectedRowSorterAbstract(String[] colNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JTreeTableSortedgetComponent()TreeTableModelSortedgetModel()booleanisBreak(TableRow last, TableRow current)voidrestoreState(PreferencesExt store)Restore the state from the last saved in the PreferencesExt.voidsaveState()Save state to the PreferencesExt.protected voidsetRows(ArrayList list)ArrayListsort(int sortCol, boolean reverse, ArrayList docs)May make a copy of the Array, or return the original, but must not copy the rows themselves.
-
-
-
Field Detail
-
columnNames
protected String[] columnNames
-
ncolumns
protected int ncolumns
-
model
protected TreeTableModelSorted model
-
table
protected JTreeTableSorted table
-
rowList
protected ArrayList rowList
-
sortNext
protected int[] sortNext
-
-
Constructor Detail
-
RowSorterAbstract
protected RowSorterAbstract(String[] colNames)
-
-
Method Detail
-
restoreState
public void restoreState(PreferencesExt store)
Restore the state from the last saved in the PreferencesExt.- Parameters:
store- ok if null or empty
-
saveState
public void saveState()
Save state to the PreferencesExt.
-
getComponent
public JTreeTableSorted getComponent()
-
getModel
public TreeTableModelSorted getModel()
-
setRows
protected void setRows(ArrayList list)
-
sort
public ArrayList sort(int sortCol, boolean reverse, ArrayList docs)
Description copied from interface:RowSorterMay make a copy of the Array, or return the original, but must not copy the rows themselves.
-
-