|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.table.TableUtils
public class TableUtils
Constructor Summary | |
---|---|
TableUtils()
|
Method Summary | |
---|---|
static JTable |
attachSorter(JTable table)
|
static int |
calculatePreferredColumnWidth(JTable table,
TableColumn col)
Calculates the preferred width of a table column based on the header. |
static JTable |
createStandardSortableTable(TableModel tableModel)
|
static TableModel |
getUnfilteredTableModel(JTable table)
Returns the innermost table model associated with this table; if layers of table model filters are wrapping it. |
static TableModel |
getUnfilteredTableModel(TableModel tableModel)
|
static void |
installDefaultRenderers(JTable table)
|
static void |
scrollToRow(JTable table,
int row)
|
static void |
setPreferredColumnWidths(JTable table)
|
static void |
sizeColumnsToFitRowData(JTable table)
resizes the column widths to optimally fit the row data. |
static void |
sizeColumnsToFitRowData(JTable table,
int maxNumberOfRows)
resizes the column widths to optimally fit the row data. |
static void |
stopCellEditing(JTable table)
Workaround for a very annoying bug in jtable where an editing cell value does not get committed on focus lost. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableUtils()
Method Detail |
---|
public static void scrollToRow(JTable table, int row)
public static JTable createStandardSortableTable(TableModel tableModel)
public static JTable attachSorter(JTable table)
public static void installDefaultRenderers(JTable table)
public static void setPreferredColumnWidths(JTable table)
public static int calculatePreferredColumnWidth(JTable table, TableColumn col)
table
-
public static TableModel getUnfilteredTableModel(JTable table)
public static void sizeColumnsToFitRowData(JTable table)
this method only tests the first row (if it exists)
table
- the table whose columns should be resized, not nullpublic static void sizeColumnsToFitRowData(JTable table, int maxNumberOfRows)
table
- the table whose columns should be resized, not nullmaxNumberOfRows
- specifies the maximum number of rows to evaluate the column widths. If it is lower or equals 0 all rows
will be evaluatedpublic static TableModel getUnfilteredTableModel(TableModel tableModel)
public static void stopCellEditing(JTable table)
table
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |