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[]
columnNames
protected TreeTableModelSorted
model
protected int
ncolumns
protected ArrayList
rowList
protected int[]
sortNext
protected JTreeTableSorted
table
-
Constructor Summary
Constructors Modifier Constructor Description protected
RowSorterAbstract(String[] colNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JTreeTableSorted
getComponent()
TreeTableModelSorted
getModel()
boolean
isBreak(TableRow last, TableRow current)
void
restoreState(PreferencesExt store)
Restore the state from the last saved in the PreferencesExt.void
saveState()
Save state to the PreferencesExt.protected void
setRows(ArrayList list)
ArrayList
sort(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:RowSorter
May make a copy of the Array, or return the original, but must not copy the rows themselves.
-
-