|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.application.SessionStorage.WindowProperty
public static class SessionStorage.WindowProperty
A sessionState
property for Window.
This class defines how the session state for Windows
is saved
and
and restored
in
terms of a property called sessionState
. The
Window's bounds Rectangle
is saved and restored
if the dimensions of the Window's screen have not changed.
WindowProperty
is registered for Window.class
by
default, so this class applies to the AWT Window
,
Dialog
, and Frame
class, as well as their
Swing counterparts: JWindow
, JDialog
, and
JFrame
.
SessionStorage.save(java.awt.Component, java.lang.String)
,
SessionStorage.restore(java.awt.Component, java.lang.String)
,
SessionStorage.WindowState
Constructor Summary | |
---|---|
SessionStorage.WindowProperty()
|
Method Summary | |
---|---|
java.lang.Object |
getSessionState(java.awt.Component c)
Returns a WindowState object
for Window c . |
void |
setSessionState(java.awt.Component c,
java.lang.Object state)
Restore the Window's bounds if the dimensions of its
screen (GraphicsConfiguration ) haven't changed, the
number of screens hasn't changed, and the
isLocationByPlatform
property, which indicates that native Window manager should
pick the Window's location, is false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionStorage.WindowProperty()
Method Detail |
---|
public java.lang.Object getSessionState(java.awt.Component c)
WindowState
object
for Window c
.
Throws an IllegalArgumentException
if Component c
isn't a non-null Window
.
getSessionState
in interface SessionStorage.Property
c
- the Window
whose bounds will be stored
in a WindowState
object.
WindowState
objectsetSessionState(java.awt.Component, java.lang.Object)
,
SessionStorage.WindowState
public void setSessionState(java.awt.Component c, java.lang.Object state)
Window's
bounds if the dimensions of its
screen (GraphicsConfiguration
) haven't changed, the
number of screens hasn't changed, and the
isLocationByPlatform
property, which indicates that native Window manager should
pick the Window's location, is false. More precisely:
If state
is non-null, and Window c's
GraphicsConfiguration
bounds
matches
the WindowState's value
,
and Window c's
isLocationByPlatform
property is false, then set the Window's to the
saved value
.
Throws an IllegalArgumentException
if c
is
not a Window
or if state
is non-null
but not an instance of SessionStorage.WindowState
.
setSessionState
in interface SessionStorage.Property
c
- the Window whose state is to be restoredstate
- the WindowState
to be restoredgetSessionState(java.awt.Component)
,
SessionStorage.WindowState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |