org.mlc.swing.layout
Class UserPrefs

java.lang.Object
  extended by org.mlc.swing.layout.UserPrefs

public class UserPrefs
extends java.lang.Object

This is a singleton container for handling user preferences. These include window size and positions, debug frame visibility, etc.

Author:
Kevin Routley

Method Summary
static UserPrefs getPrefs()
          Access the singleton instance.
 void saveDebugState(boolean b)
          Save the current state of the panel - debug on/off.
 void saveWinLoc(java.lang.String winname, java.awt.Window window)
          Save a window's size and position data under the provided name.
 boolean showDebugPanel()
          Should we show the debug panel?
 void useSavedBounds(java.lang.String winname, java.awt.Window window)
          Fetch a window's size and position data and apply it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPrefs

public static UserPrefs getPrefs()
Access the singleton instance.


showDebugPanel

public boolean showDebugPanel()
Should we show the debug panel?


saveDebugState

public void saveDebugState(boolean b)
Save the current state of the panel - debug on/off.


useSavedBounds

public void useSavedBounds(java.lang.String winname,
                           java.awt.Window window)
Fetch a window's size and position data and apply it. The window name must be the same as supplied when calling @see saveWinLoc.


saveWinLoc

public void saveWinLoc(java.lang.String winname,
                       java.awt.Window window)
Save a window's size and position data under the provided name. (The data must be fetched using the same name).