edu.psu.geovista.app.spreadsheet.table
Class TableColumnSort

java.lang.Object
  extended byedu.psu.geovista.app.spreadsheet.table.TableColumnSort

public class TableColumnSort
extends java.lang.Object


Constructor Summary
TableColumnSort(SSTableModel tm)
           
 
Method Summary
 void clearSort()
          clear all sort of the table
 java.awt.Point getCellPointAt(int vx, int vy)
          Given a cell point in sortModel, return it position in real Model
 java.util.Vector getColumnSort(int col)
          Return the sort vector for the column with given index(in model) if not vector exist for the index, set null for that index in sorts it means that column is not sorted(thus no corresponding vector in sorts)
 SortRange getSortRange()
           
 java.util.Vector getSorts()
           
 boolean isTableSort()
          return true if sort apply to any range of the table
 void setTableSort(boolean tableSort)
           
static void showVector(java.util.Vector v)
          Select a column
 void sortColumns(int col, int[] cols, boolean ascending)
          sort column
 void sortRange(int col, int[] rows, int[] cols, boolean ascending)
          sort Range
 void sortRows(int col, int[] rows, boolean ascending)
           
 void sortTable(int col, boolean ascending)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableColumnSort

public TableColumnSort(SSTableModel tm)
Method Detail

getSortRange

public SortRange getSortRange()

getColumnSort

public java.util.Vector getColumnSort(int col)
Return the sort vector for the column with given index(in model) if not vector exist for the index, set null for that index in sorts it means that column is not sorted(thus no corresponding vector in sorts)


sortRows

public void sortRows(int col,
                     int[] rows,
                     boolean ascending)

sortTable

public void sortTable(int col,
                      boolean ascending)

sortColumns

public void sortColumns(int col,
                        int[] cols,
                        boolean ascending)
sort column

Parameters:
col - based on which sorting is done
cols - sorting apply only to those columns

sortRange

public void sortRange(int col,
                      int[] rows,
                      int[] cols,
                      boolean ascending)
sort Range

Parameters:
col - based on which sorting is done
cols - sorting apply only to those columns

getCellPointAt

public java.awt.Point getCellPointAt(int vx,
                                     int vy)
Given a cell point in sortModel, return it position in real Model

Parameters:
vx - sortModel 's x . For table view, it is just Model x

showVector

public static void showVector(java.util.Vector v)
Select a column


getSorts

public java.util.Vector getSorts()

isTableSort

public boolean isTableSort()
return true if sort apply to any range of the table


setTableSort

public void setTableSort(boolean tableSort)

clearSort

public void clearSort()
clear all sort of the table



Copyright © 1996-2003 GeoVista Center. All Rights Reserved.