rero.config
public class ClientState extends Object
Field Summary | |
---|---|
protected Properties | backup |
protected static File | baseDirectory |
protected Set | changes |
protected static ClientState | clientState |
protected static HashMap | listeners |
protected Properties | state |
Constructor Summary | |
---|---|
ClientState() |
Method Summary | |
---|---|
void | addClientStateListener(String property, ClientStateListener l) |
void | backup() performs a backup of the properties before making changes, it is the responsability of the changing class to call this function |
void | fireChange(String property) |
void | fireChange(String property, String parameter) |
static File | getBaseDirectory() |
Rectangle | getBounds(String key, Dimension areaSize, Dimension mySize) |
static ClientState | getClientState() |
Color | getColor(String key, Color defaultColor) |
static File | getFile(String filename) |
float | getFloat(String key, float defaultValue) |
Font | getFont(String key, Font defaultValue) |
String | getHelpString(String topic) |
ImageIcon | getIcon(String key, String defaultResource) |
int | getInteger(String key, int defaultValue) |
URL | getPackagedResource(String fileName, String subDir) |
static InputStreamReader | getProperInputStream(InputStream stream) |
static PrintStream | getProperPrintStream(OutputStream stream) |
Properties | getProperties() |
URL | getResource(String fileName) |
InputStream | getResourceAsStream(String fileName) |
String | getString(String key, String defaultValue) |
StringList | getStringList(String key) |
boolean | isOption(String key, boolean defaultBoolean) |
boolean | isValue(String key, String item) |
void | restore() performs a restore of the properties effectively undoing everything since the last backup, it is the responsability of the changing class to call this function |
static void | setBaseDirectory(String directory) |
void | setBounds(String key, Rectangle value) |
void | setColor(String key, Color color) |
void | setFloat(String key, float value) |
void | setFont(String key, Font value) |
void | setInteger(String key, int value) |
void | setOption(String key, boolean value) |
void | setString(String key, String value) |
void | sync() sync the file system config file with the current client state |