com.retek.commons.gui.table
Class REntryTableSort

java.lang.Object
  extended bycom.retek.commons.gui.table.REntryTableSort

public class REntryTableSort
extends java.lang.Object

This class sorts REntryTable based information by a specific column. This class is exclusive to the REntryTable and will only work on data formated for a REntryTable.

Retek Inc. Copyright (c) 2002


Constructor Summary
REntryTableSort()
          Returns new REntryTableSort object.
 
Method Summary
 int[] getDefaultSortColumns()
          Gets the default columns to sort on.
 void setDefaultSortColumns(int[] defaultSortColumns)
          Sets the default columns to sort on.
 void sortTable(java.util.ArrayList list, int column, boolean sortAscending)
          Sorts the input ArrayList based on the column number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

REntryTableSort

public REntryTableSort()
Returns new REntryTableSort object.

Method Detail

getDefaultSortColumns

public int[] getDefaultSortColumns()
Gets the default columns to sort on.

Returns:
An int array of the table columns to sort the list on.

setDefaultSortColumns

public void setDefaultSortColumns(int[] defaultSortColumns)
Sets the default columns to sort on.


sortTable

public void sortTable(java.util.ArrayList list,
                      int column,
                      boolean sortAscending)
               throws java.lang.ClassCastException
Sorts the input ArrayList based on the column number. Each element of the ArrayList is a single table row (in other words, an REntryRow object);

Parameters:
list - The list of table rows to sort.
column - The table column to sort the list on.
sortAscending - If true, the sort is ascending, if false, descending.
Throws:
java.lang.ClassCastException - Thrown if the data in a table element is not valid.


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28