net.clackrouter.jgraph.utils
Class UserProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by net.clackrouter.jgraph.utils.UserProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class UserProperties
extends java.util.Properties

See Also:
Serialized Form

Field Summary
protected  java.io.File file
           
protected static java.util.Vector instances
           
protected  java.lang.String nameSpace
           
 
Fields inherited from class java.util.Properties
defaults
 
Method Summary
static UserProperties getInstance(java.lang.String nameSpace)
          Multi-Singleton instance factory method.
 java.awt.Rectangle getRect(java.lang.String key)
          Gets the {3} attribute of the UserProperties object
 void save()
          Description of the Method
static void saveAll()
          Description of the Method
 void setRect(java.lang.String key, java.awt.Rectangle r)
          Sets the {3} attribute of the UserProperties object
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

instances

protected static java.util.Vector instances

nameSpace

protected java.lang.String nameSpace

file

protected java.io.File file
Method Detail

getInstance

public static final UserProperties getInstance(java.lang.String nameSpace)
Multi-Singleton instance factory method.

Parameters:
nameSpace - nameSpace is the name of the directory that user properties will be stored. This acts as a 'namespace' by which sets of properties can collectively be stored. For each new nameSpace, a new directory (prepended with '.') is created and properties stored in a file named user.properties. For example, if 'example' is passed as nameSpace, the following directory would be created C:\\Documents and Settings\\userlogin\\.testapp\\user.properties (Win2k).
Returns:
the UserProperties instance

saveAll

public static void saveAll()
Description of the Method


setRect

public void setRect(java.lang.String key,
                    java.awt.Rectangle r)
Sets the {3} attribute of the UserProperties object

Parameters:
key - The new {3} value
r - The new {3} value

getRect

public java.awt.Rectangle getRect(java.lang.String key)
Gets the {3} attribute of the UserProperties object

Parameters:
key - Description of Parameter
Returns:
The {3} value

save

public void save()
Description of the Method