|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.application.session.TableProperty
public class TableProperty
A sessionState property for JTable
This class defines how the session state for JTables
is saved and
and restored in
terms of a property called sessionState.
We save and restore the width of each resizable
TableColumn, if the number of columns haven't
changed.
TableProperty is registered for JTable.class by default, so this class applies to
JTable and any subclass of JTable. One can
override the default with the putProperty
method.
TableState,
SessionStorage.save(java.awt.Component, java.lang.String),
SessionStorage.restore(java.awt.Component, java.lang.String)| Constructor Summary | |
|---|---|
TableProperty()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
getSessionState(java.awt.Component c)
Returns a TableState object
for JTable c or null, if none of the JTable's
columns are resizable. |
void |
setSessionState(java.awt.Component c,
java.lang.Object state)
Restore the width of each resizable TableColumn, if
the number of columns haven't changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableProperty()
| Method Detail |
|---|
public java.lang.Object getSessionState(java.awt.Component c)
TableState object
for JTable c or null, if none of the JTable's
columns are resizable.
A width of -1 is used to mark TableColumns
that are not resizable.
Throws an IllegalArgumentException if Component c
isn't a non-null JTable.
getSessionState in interface PropertySupportc - the JTable whose columnWidths will be
saved in a TableState object.
TableState object or nullsetSessionState(java.awt.Component, java.lang.Object),
TableState
public void setSessionState(java.awt.Component c,
java.lang.Object state)
TableColumn, if
the number of columns haven't changed.
Throws an IllegalArgumentException if c is
not a JTable or if state is not an instance
of TableState.
setSessionState in interface PropertySupportc - the JTable whose column widths are to be restoredstate - the TableState to be restoredgetSessionState(java.awt.Component),
TableState
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||