org.tbee.swing.table
Class JTableAutoSizer

java.lang.Object
  extended by org.tbee.swing.table.JTableAutoSizer

public class JTableAutoSizer
extends Object

This class listens to changes to the tablemodel and resizes the columns to at least show the content (using JTableHelper). It does not shrink (unless it is an initial filling).

Usage

Usage is simple:

JTableAutoSizer.install(jtable); TODO: can we invoke this in a low priority thread so it won't cost perfomance? TBEE 2007-02-09: JTableAutoSizer may resize columns, if it does, for some reason the following editCellAt is not done correctly. Even though the JTable itself firmly believes it is editing. Repeating the edit cell instruction works around this problem. http://forum.java.sun.com/thread.jspa?threadID=5134899

Version:
$Revision: 1.23 $

Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
JTableAutoSizer(JTable jtable)
           
 
Method Summary
static void install(JTable table)
          install an autosized on this table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

JTableAutoSizer

public JTableAutoSizer(JTable jtable)
Method Detail

install

public static void install(JTable table)
install an autosized on this table



Copyright © 2011 KnowledgePlaza. All Rights Reserved.