public class TabbedPaneProperty extends Object implements PropertySupport
sessionState property for JTabbedPane.
This class defines how the session state for JTabbedPanes
is saved and
and restored in
terms of a property called sessionState. The
JTabbedPane's selectedIndex is saved and restored
if the number of tabs (tabCount) hasn't changed.
TabbedPaneProperty is registered for JTabbedPane.class by default, so this class applies to
JTabbedPane and any subclass of JTabbedPane. One can
override the default with the putProperty
method.
| Constructor and Description |
|---|
TabbedPaneProperty() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getSessionState(Component c)
Returns a
TabbedPaneState object
for JTabbedPane c. |
void |
setSessionState(Component c,
Object state)
|
public Object getSessionState(Component c)
TabbedPaneState object
for JTabbedPane c.
Throws an IllegalArgumentException if Component c
isn't a non-null JTabbedPane.
getSessionState in interface PropertySupportc - the JTabbedPane whose selectedIndex will
recoreded in a TabbedPaneState object.TabbedPaneState objectsetSessionState(java.awt.Component, java.lang.Object),
TabbedPaneStatepublic void setSessionState(Component c, Object state)
JTabbedPane's selectedIndex
property if the number of tabs
has not changed.
Throws an IllegalArgumentException if c is
not a JTabbedPane or if state is non-null
but not an instance of TabbedPaneState.
setSessionState in interface PropertySupportc - the JTabbedPane whose state is to be restoredstate - the TabbedPaneState to be restoredgetSessionState(java.awt.Component),
TabbedPaneStateCopyright © 2009–2016. All rights reserved.