com.retek.commons.gui.table
Class RLayerTableSort

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

public class RLayerTableSort
extends java.lang.Object

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

Retek Inc. Copyright (c) 2002


Constructor Summary
RLayerTableSort()
          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

RLayerTableSort

public RLayerTableSort()
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 © 2005 Retek Inc. All Rights Reserved. - Generated at Fri, 01/21/2005 14:25