org.xith3d.utility.properties
Class PropertyManager

java.lang.Object
  extended by org.xith3d.utility.properties.PropertyManager

public class PropertyManager
extends java.lang.Object

:Id: PropertyManager.java,v 1.6 2003/02/24 00:13:53 wurp Exp $ :Log: PropertyManager.java,v $ Revision 1.6 2003/02/24 00:13:53 wurp Formatted all java code for cvs (strictSunConvention.xml) Revision 1.5 2002/05/15 02:02:31 dilvish Major updates for inventory and terrain Revision 1.4 2001/06/20 04:05:42 wurp added log4j. Revision 1.3 2001/01/02 11:12:26 wurp Added getProperty to PropertyManager; made convertToString slightly more efficient in StringProperty. Revision 1.2 2000/11/04 12:09:58 wizofid Finishing property manager integeration Revision 1.1 2000/10/08 21:38:22 entropy Initial checkin Revision 1.1 2000/09/21 11:08:03 dyazel Implemented a generic property manager This class allows you to setup project properties, read and write them to a commented property file, and yet still be able to access the values quickly at runtime.


Constructor Summary
PropertyManager()
           
 
Method Summary
 void addProperty(PropertyInterface prop)
          When adding a property to the list, we specfify all the information regarding that property so we can read and write them
 PropertyInterface getProperty(java.lang.String name)
          Retrieves a property from the manager.
 void load(java.lang.String filename)
          This will load the specified file, then match all the defined properties against the properties in the file.
 void save(java.lang.String filename)
          Writes the properties out to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyManager

public PropertyManager()
Method Detail

addProperty

public void addProperty(PropertyInterface prop)
When adding a property to the list, we specfify all the information regarding that property so we can read and write them

Parameters:
prop - The name of the property

getProperty

public PropertyInterface getProperty(java.lang.String name)
Retrieves a property from the manager.

Parameters:
name - The name of the property
Returns:
PropertyInterface reference back to the property.

save

public void save(java.lang.String filename)
Writes the properties out to a file


load

public void load(java.lang.String filename)
This will load the specified file, then match all the defined properties against the properties in the file. The values in the properties will then be overwritten