Package org.jdesktop.application.session

# Interface PropertySupport

All Known Implementing Classes:
  `SplitPaneProperty`, `TabbedPaneProperty`, `TableProperty`, `WindowProperty`

public interface PropertySupport
Defines the `sessionState` property. The value of this property is the GUI state that should be preserved across sessions for the specified component. The type of sessionState values just one those supported by `XMLEncoder` and `XMLDecoder`, for example beans (null constructor, read/write properties), primitives, and Collections.

See Also:
  - `SessionStorage.putProperty(java.lang.Class, org.jdesktop.application.session.PropertySupport)`
  - `SessionStorage.getProperty(Class)`
  - `SessionStorage.getProperty(Component)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`getSessionState(Component c)`
Return the value of the `sessionState` property, typically a Java bean or a Collection the defines the `Component` state that should be preserved across Application sessions.
`void`
`setSessionState(Component c, Object state)`
Restore Component `c's` `sessionState` from the specified object.

## Method Details

### getSessionState

Object getSessionState(Component c)
Return the value of the `sessionState` property, typically a Java bean or a Collection the defines the `Component` state that should be preserved across Application sessions. This value will be stored with `XMLEncoder`, loaded with `XMLDecoder`, and passed to `setSessionState` to restore the Component's state.

Parameters:
  `c` - the Component.
Returns:
  the `sessionState` object for Component `c`.
See Also:
  - `setSessionState(java.awt.Component, java.lang.Object)`

### setSessionState

void setSessionState(Component c, Object state)
Restore Component `c's` `sessionState` from the specified object.

Parameters:
  `c` - the Component.
  `state` - the value of the `sessionState` property.
See Also:
  - `getSessionState(java.awt.Component)`