com.metamatrix.console.util
Class StaticTableUtilities

java.lang.Object
  extended by com.metamatrix.console.util.StaticTableUtilities

public class StaticTableUtilities
extends java.lang.Object


Constructor Summary
StaticTableUtilities()
           
 
Method Summary
static int getColumnNumForTableColumn(javax.swing.JTable table, java.lang.String columnName)
           
static void restoreSelections(javax.swing.JTable table, int indexCol, java.lang.Object[] selections)
          Corresponding method to saveSelections().
static java.lang.Object[] saveSelections(javax.swing.JTable table, int indexCol)
          Effectively save the currently selected rows in a table, by saving the element in each selected row for a given column.
static java.lang.String tableContents(javax.swing.JTable table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticTableUtilities

public StaticTableUtilities()
Method Detail

saveSelections

public static java.lang.Object[] saveSelections(javax.swing.JTable table,
                                                int indexCol)
Effectively save the currently selected rows in a table, by saving the element in each selected row for a given column. This is an index column whose elements must uniquely identify the row.

Parameters:
table - The JTable being operated on
indexCol - A table column whose elements will uniquely identify a row of the table
Returns:
Object[] The array of items in column indexCol of each selected row

restoreSelections

public static void restoreSelections(javax.swing.JTable table,
                                     int indexCol,
                                     java.lang.Object[] selections)
Corresponding method to saveSelections(). All rows in the table whose object at indexCol matches any item in selections will be selected.

Parameters:
table - The JTable being operated on
indexCol - The column to look in JTable for a match against selections
selections - The set of objects whose rows are to be selected

getColumnNumForTableColumn

public static int getColumnNumForTableColumn(javax.swing.JTable table,
                                             java.lang.String columnName)

tableContents

public static java.lang.String tableContents(javax.swing.JTable table)


Copyright © 2009. All Rights Reserved.