Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.swing.desktop
Class LayoutPersistence

    java.lang.Object
      org.crosswire.common.swing.desktop.LayoutPersistence

    public class LayoutPersistence

extends Object

Window layout persistence mechanism. Intended to be flexible enough to allow persisting size, position, layout of multiple windows.

Author:
  Adam Thomas [adam-thomas at cox dot net], DM Smith [dmsmith555 at yahoo dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`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 Logger` | `log` Provide class logging capabilities
`private Properties` | `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

Constructor Summary
`private` | `LayoutPersistence()` Creates the singleton persistence object capable of storing and retrieving layout information on behalf windows.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static final Logger log

  Provide class logging capabilities

### settings

    private Properties settings

  The persistence storage and retrieval object

### STATE

    private static final int STATE

  Suffix for window state key

  See Also:
    Constant Field Values

### WIDTH

    private static final int WIDTH

  Suffix for window width key

  See Also:
    Constant Field Values

### HEIGHT

    private static final int HEIGHT

  Suffix for window height key

  See Also:
    Constant Field Values

### LOCATION_X

    private static final int LOCATION_X

  Suffix for window location x key

  See Also:
    Constant Field Values

### LOCATION_Y

    private static final int LOCATION_Y

  Suffix for window location y key

  See Also:
    Constant Field Values

### instance

    private static LayoutPersistence instance

  The singleton instance of this class.

Constructor Detail

### LayoutPersistence

    private LayoutPersistence()

  Creates the singleton persistence object capable of storing and retrieving layout information on behalf windows.

Method Detail

### instance

    public static LayoutPersistence instance()

  All access to LayoutPersistence is through this single instance.

  Returns:
    the singleton instance

### isLayoutPersisted

    public boolean isLayoutPersisted(Window window)

  Indicates whether the window passed to the constructor has had layout information persisted.

  Parameters:
    `window` - the window to persist
  Returns:
    Returns true is layout information for the current window has been persisted, otherwise returns false

### saveLayout

    public void saveLayout(Window window)

  Stores the current window's layout information.

  Parameters:
    `window` - the window to persist

### restoreLayout

    public void restoreLayout(Window window)

  Loads and restores the layout to the window that was passed to the constructor.

  Parameters:
    `window` - the window to persist

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2007
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD