Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.progeeks.util.swing
Class TableUtils  view TableUtils download TableUtils.java

java.lang.Object
  extended byorg.progeeks.util.swing.TableUtils

public class TableUtils
extends java.lang.Object

Utility methods for JTables.

Version:
$Revision: 1.1 $

Nested Class Summary
private static class TableUtils.HeaderMouseListener
          Listens for mouse clicks on the table's header and sets the appropriate sort column.
 
Field Summary
(package private) static org.progeeks.util.log.Log log
           
 
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
 

Field Detail

log

static org.progeeks.util.log.Log log
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)