|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.toybox.client.ToyBoxPrefs
public class ToyBoxPrefs
Maintains preferences for the ToyBox client.
| Field Summary | |
|---|---|
static PrefsConfig |
config
Defines the location in the preference system of our prefs. |
protected static String |
PASSWORD_KEY
The configuration key for the user's password. |
protected static String |
PASSWORD_LEN_KEY
The configuration key for the user's password length. |
protected static String |
REMEMBER_PASSWORD_KEY
The configuration key for whether the user's password is remembered. |
protected static String |
USERNAME_KEY
The configuration key for the user's username. |
| Constructor Summary | |
|---|---|
ToyBoxPrefs()
|
|
| Method Summary | |
|---|---|
static Rectangle |
getClientBounds(String gameId,
String username)
Returns the preferred bounds for the client frame. |
static String |
getPassword()
Returns the user's (encrypted) password. |
static int |
getPasswordLength()
Gets the length of the unencrypted password. |
static boolean |
getRememberPassword()
Returns whether we're remembering the user's password. |
static String |
getUsername()
Returns the user's username. |
protected static String |
makeKey(String gameId,
String username)
A helper function. |
static void |
setClientBounds(String gameId,
String username,
Rectangle bounds)
Updates our stored setting of the preferred bounds for the client frame. |
static void |
setPassword(String value)
Sets the user's (encrypted) password. |
static void |
setPasswordLength(int len)
Sets the length of the unencrypted password. |
static void |
setRememberPassword(boolean value)
Sets whether we're remembering the user's password. |
static void |
setUsername(String value)
Sets the user's username. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static PrefsConfig config
protected static final String USERNAME_KEY
protected static final String PASSWORD_KEY
protected static final String PASSWORD_LEN_KEY
protected static final String REMEMBER_PASSWORD_KEY
| Constructor Detail |
|---|
public ToyBoxPrefs()
| Method Detail |
|---|
public static Rectangle getClientBounds(String gameId,
String username)
gameId - the id of the game we are playing.username - the developer override username if one was provided
or null otherwise.
public static void setClientBounds(String gameId,
String username,
Rectangle bounds)
gameId - the id of the game we are playing.username - the developer override username if one was provided
or null otherwise.bounds - the new frame bounds.public static String getUsername()
public static void setUsername(String value)
public static String getPassword()
public static void setPassword(String value)
public static int getPasswordLength()
public static void setPasswordLength(int len)
public static boolean getRememberPassword()
public static void setRememberPassword(boolean value)
protected static String makeKey(String gameId,
String username)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||