edu.jhu.tmaj.client.tables.data
Class ColumnWidthData
java.lang.Object
edu.jhu.tmaj.client.tables.data.ColumnWidthData
public final class ColumnWidthData
- extends java.lang.Object
This class stores the user-assigned width and order to columns in a table. Since JTables often
automatically resize their column-widths, this class is useful for keeping the user's preference
for each column's width.
Method Summary |
boolean |
applyColumnWidths(javax.swing.table.TableColumnModel tableColumnModel)
Sets the widths in the specified tableColumnModel to a previously saved one. |
static void |
expandColumnWidth(javax.swing.table.TableColumnModel tableColumnModel,
java.lang.String name,
int width)
|
void |
saveColumnWidths(javax.swing.table.TableColumnModel tableColumnModel)
Saves the widths of this TableColumnModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColumnWidthData
public ColumnWidthData()
saveColumnWidths
public void saveColumnWidths(javax.swing.table.TableColumnModel tableColumnModel)
- Saves the widths of this TableColumnModel
applyColumnWidths
public boolean applyColumnWidths(javax.swing.table.TableColumnModel tableColumnModel)
- Sets the widths in the specified tableColumnModel to a previously saved one. The previously
saved TableColumnModel must have the same column objects; otherwise this method has no
effect.
expandColumnWidth
public static void expandColumnWidth(javax.swing.table.TableColumnModel tableColumnModel,
java.lang.String name,
int width)