textbender.o.swing.table
Class ColumnWidthsPreference

java.lang.Object
  extended by ColumnWidthsPreference

public class ColumnWidthsPreference
extends Object

Preference storage for the column widths of a table. Stores under keys "column.c.width", where c is the column index.


Constructor Summary
ColumnWidthsPreference(TableColumnModel columnModel, Preferences preferences, RunBuffer runBuffer)
          Creates a ColumnWidthsPreference.
 
Method Summary
 Preferences preferences()
          Returns the preference node used for storage.
 void restore()
          Restores the preferred widths, and begins automatically storing changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnWidthsPreference

public ColumnWidthsPreference(TableColumnModel columnModel,
                              Preferences preferences,
                              RunBuffer runBuffer)
Creates a ColumnWidthsPreference. Begins to automatically store changes only after you call restore().

There is currently no way to remove it from the columnModel. Create one only per columnModel, or they will accumulate.

Parameters:
columnModel - whose column widths to store and restore
preferences - per preferences()
runBuffer - (a slow one is fine)
Method Detail

preferences

public Preferences preferences()
Returns the preference node used for storage.


restore

public void restore()
Restores the preferred widths, and begins automatically storing changes. Normally, called once only; subsequent calls should have no effect.