Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.javatools.ui.table
Class TableHelper

java.lang.Object
  extended by oracle.javatools.ui.table.TableHelper

public class TableHelper
extends java.lang.Object

A class of static helper methods for dealing with JTables.


Constructor Summary
TableHelper()
           
 
Method Summary
static int getCellWidth(javax.swing.JTable table, java.lang.Object value, int row, int col)
          Return the preferred size of a table cell
static void setVisibleRows(javax.swing.JTable table, javax.swing.JScrollPane sp, int rows)
          Set the preferred size of the scrollpane to the desired number of visible table rows.
static void sizeColumnToContents(javax.swing.JTable table, int col, int sampleSize)
          Size one column of a table to be just large enough to fully display its current contents.
static void sizeTableToContents(javax.swing.JTable table)
          Size all the columns of a table to be just large enough to fully display their current contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableHelper

public TableHelper()
Method Detail

setVisibleRows

public static void setVisibleRows(javax.swing.JTable table,
                                  javax.swing.JScrollPane sp,
                                  int rows)
Set the preferred size of the scrollpane to the desired number of visible table rows.


sizeTableToContents

public static void sizeTableToContents(javax.swing.JTable table)
Size all the columns of a table to be just large enough to fully display their current contents.

Parameters:
table -

sizeColumnToContents

public static void sizeColumnToContents(javax.swing.JTable table,
                                        int col,
                                        int sampleSize)
Size one column of a table to be just large enough to fully display its current contents.

Parameters:
table -

getCellWidth

public static int getCellWidth(javax.swing.JTable table,
                               java.lang.Object value,
                               int row,
                               int col)
Return the preferred size of a table cell

Parameters:
table -
value -
row -
col -
Returns:

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

Copyright © 1997, 2009, Oracle. All rights reserved.