public final class LayoutPersistence extends Object
for license details.
Modifier and Type | Field and Description |
---|---|
private static int |
HEIGHT
Suffix for window height key
|
private static LayoutPersistence |
instance
The singleton instance of this class.
|
private static int |
LOCATION_X
Suffix for window location x key
|
private static int |
LOCATION_Y
Suffix for window location y key
|
private static org.slf4j.Logger |
log
The log stream
|
private org.crosswire.common.util.PropertyMap |
settings
The persistence storage and retrieval object
|
private static int |
STATE
Suffix for window state key
|
private static int |
WIDTH
Suffix for window width key
|
Modifier | Constructor and Description |
---|---|
private |
LayoutPersistence()
Creates the singleton persistence object capable of storing and
retrieving layout information on behalf windows.
|
Modifier and Type | Method and Description |
---|---|
static LayoutPersistence |
instance()
All access to LayoutPersistence is through this single instance.
|
boolean |
isLayoutPersisted(Window window)
Indicates whether the window passed to the constructor has had layout
information persisted.
|
void |
restoreLayout(Window window)
Loads and restores the layout to the window that was passed to the
constructor.
|
void |
saveLayout(Window window)
Stores the current window's layout information.
|
private org.crosswire.common.util.PropertyMap settings
private static final int STATE
private static final int WIDTH
private static final int HEIGHT
private static final int LOCATION_X
private static final int LOCATION_Y
private static LayoutPersistence instance
private static final org.slf4j.Logger log
private LayoutPersistence()
public static LayoutPersistence instance()
public boolean isLayoutPersisted(Window window)
window
- the window to persistpublic void saveLayout(Window window)
window
- the window to persistpublic void restoreLayout(Window window)
window
- the window to persist