edu.jhu.tmaj.client.image.data
Class JTableUtil

java.lang.Object
  extended by edu.jhu.tmaj.client.image.data.JTableUtil

public final class JTableUtil
extends java.lang.Object


Field Summary
static int DEFAULT_NORMAL_WIDTH
           
 
Method Summary
static void hideColumns(javax.swing.JTable table, java.lang.String[] columnNames)
          Sets the width of all the columnames in columnNames[] to zero.
static boolean isColumnShown(javax.swing.JTable table, int modelColumnNumber)
           
static void setColumnViewable(javax.swing.JTable table, GeneralTableModel tableModel, java.lang.Object columnIdentifier, boolean isViewable)
           
static void setColumnViewable(javax.swing.JTable table, int modelColumnNumber, boolean isViewable)
          Hides or unhides a column in the JTable.
static void setColumnWidths(javax.swing.JTable table, int width)
          Used for setting the column-width-minimum to zero for all the columns in a jtable, allowing the user to "hide" columns
static void setColumnWidthsToMinimum(javax.swing.JTable table, javax.swing.table.TableModel tableModel)
          Set the column-width-minimum to zero for all the columns in a jtable, allowing the user to "hide" columns
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NORMAL_WIDTH

public static final int DEFAULT_NORMAL_WIDTH
See Also:
Constant Field Values
Method Detail

setColumnWidths

public static void setColumnWidths(javax.swing.JTable table,
                                   int width)
Used for setting the column-width-minimum to zero for all the columns in a jtable, allowing the user to "hide" columns


setColumnViewable

public static void setColumnViewable(javax.swing.JTable table,
                                     int modelColumnNumber,
                                     boolean isViewable)
Hides or unhides a column in the JTable.


isColumnShown

public static boolean isColumnShown(javax.swing.JTable table,
                                    int modelColumnNumber)

setColumnViewable

public static void setColumnViewable(javax.swing.JTable table,
                                     GeneralTableModel tableModel,
                                     java.lang.Object columnIdentifier,
                                     boolean isViewable)

setColumnWidthsToMinimum

public static void setColumnWidthsToMinimum(javax.swing.JTable table,
                                            javax.swing.table.TableModel tableModel)
Set the column-width-minimum to zero for all the columns in a jtable, allowing the user to "hide" columns


hideColumns

public static void hideColumns(javax.swing.JTable table,
                               java.lang.String[] columnNames)
Sets the width of all the columnames in columnNames[] to zero. This method doesn't work if 2 columns have the same name.