org.progeeks.util.swing
Class TableUtils

java.lang.Object
  extended by org.progeeks.util.swing.TableUtils

public class TableUtils
extends java.lang.Object

Utility methods for JTables.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
TableUtils()
           
 
Method Summary
static void addSortDecorators(javax.swing.JTable table)
           
static int getPreferredColumnWidth(javax.swing.JTable table, int column)
          Returns the preferred column width based on the maximum preferred width of all cells in the column.
static int getPreferredHeaderWidth(javax.swing.JTable table, int column)
          Returns the header preferred width for a specified column.
static void resizeColumns(javax.swing.JTable table)
          Resizes the columns of the table so that the maximum sized renderer will fit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableUtils

public TableUtils()
Method Detail

resizeColumns

public static void resizeColumns(javax.swing.JTable table)
Resizes the columns of the table so that the maximum sized renderer will fit.


getPreferredHeaderWidth

public static int getPreferredHeaderWidth(javax.swing.JTable table,
                                          int column)
Returns the header preferred width for a specified column.


getPreferredColumnWidth

public static int getPreferredColumnWidth(javax.swing.JTable table,
                                          int column)
Returns the preferred column width based on the maximum preferred width of all cells in the column.


addSortDecorators

public static void addSortDecorators(javax.swing.JTable table)


Copyright © 2002-2003 Paul Speed. All Rights Reserved.