|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--java.util.Properties
|
+--com.denova.util.PropertyList
Extends Properties and implements Runnable.
| Field Summary |
| Fields inherited from class java.util.Properties |
defaults |
| Constructor Summary | |
PropertyList()
Extends Properties and implements Runnable. |
|
PropertyList(java.util.Properties defaults)
Extends Properties and implements Runnable. |
|
| Method Summary | |
void |
addProperties(java.util.Properties p)
Adds the Properties to the current Properties. |
void |
addPropertyList(com.denova.util.PropertyList p)
Adds the PropertyList to the current PropertyList. |
void |
clear()
Deletes all the properties. |
void |
clearLastError()
Clears the last known error. |
boolean |
fromString(java.lang.String s)
Adds the values from a String produced by toString() to this PropertyList. |
boolean |
getBooleanProperty(java.lang.String name)
Gets a boolean property. |
boolean |
getBooleanProperty(java.lang.String name,
boolean dflt)
Gets a boolean property. |
int |
getIntProperty(java.lang.String name)
Gets an integer property. |
java.lang.Exception |
getLastError()
Gets the last known error. |
long |
getLongProperty(java.lang.String name)
Gets an integer property. |
java.util.Properties |
getProperties()
Gets the current Properties. |
java.util.Properties |
getPropertyList()
Gets the current PropertyList. |
com.denova.util.PropertyList |
getPropertyListProperty(java.lang.String name)
Gets a PropertyList property. |
com.denova.util.PropertyList |
getPropertyListProperty(java.lang.String name,
com.denova.util.PropertyList dflt)
Gets a PropertyList property. |
boolean |
load(java.io.File f)
Loads the Properties from the File. |
void |
load(java.io.InputStream in)
Loads the Properties from the InputStream. |
boolean |
load(java.lang.String filename)
Loads the Properties from the filename. |
static void |
main(java.lang.String[] args)
The main program for the PropertyList class |
java.util.Vector |
propertyNamesList()
|
java.lang.Object |
removeProperty(java.lang.String attribute)
Deletes a property. |
void |
run()
Thread safe way to set a container |
boolean |
save(java.io.File f)
Saves the Properties to the File. |
void |
save(java.io.OutputStream outStream,
java.lang.String title)
Saves the Properties to the stream with the given title. |
boolean |
save(java.lang.String filename)
Saves the Properties to the filename. |
void |
setBooleanProperty(java.lang.String name,
boolean value)
Sets the boolean AV pair. |
boolean |
setContainer(com.denova.lang.FieldAccess fieldAccess)
Sets the container. |
boolean |
setProperties(java.awt.Container container,
com.denova.lang.FieldAccess fieldAccess)
Sets the current Properties. |
void |
setProperties(java.util.Properties p)
Sets the current Properties. |
java.lang.Object |
setProperty(java.lang.String name,
java.awt.Component c)
Sets an AV pair. |
java.lang.Object |
setProperty(java.lang.String name,
int i)
Sets an AV pair. |
java.lang.Object |
setProperty(java.lang.String name,
long l)
Sets an AV pair. |
java.lang.Object |
setProperty(java.lang.String attribute,
java.util.Properties value)
Sets an AV pair. |
java.lang.Object |
setProperty(java.lang.String attribute,
java.lang.String value)
Sets an AV pair. |
void |
setPropertyList(com.denova.util.PropertyList p)
Sets the current PropertyList. |
void |
setPropertyListProperty(java.lang.String name,
com.denova.util.PropertyList value)
Sets a PropertyList property. |
void |
setTitle(java.lang.String newTitle)
Sets the title in the properties file. |
java.lang.String |
toString()
Changes the entire PropertyList into a single String. |
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, propertyNames, store |
| Methods inherited from class java.util.Hashtable |
clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PropertyList(java.util.Properties defaults)
defaults sets the default Properties
defaults - public PropertyList()
| Method Detail |
public static void main(java.lang.String[] args)
args - The command line argumentspublic boolean load(java.lang.String filename)
filename -
public boolean load(java.io.File f)
f - the properties file
public void load(java.io.InputStream in)
throws java.io.IOException
load in class java.util.Propertiesin -
java.io.IOException - any I/O exceptionspublic boolean save(java.lang.String filename)
filename - full path name of properties file.
public boolean save(java.io.File f)
f - properties file.
public void save(java.io.OutputStream outStream,
java.lang.String title)
save in class java.util.PropertiesoutStream - title - public void setTitle(java.lang.String newTitle)
newTitle: new string to use at the top of the properties file in a comment line.
newTitle - new title
public java.lang.Object setProperty(java.lang.String attribute,
java.lang.String value)
setProperty in class java.util.Propertiesattribute - property's keyvalue - property's setting
public java.lang.Object setProperty(java.lang.String attribute,
java.util.Properties value)
attribute - property's keyvalue - property's setting
public java.lang.Object setProperty(java.lang.String name,
java.awt.Component c)
name - name of the propertyc - property's setting
public java.lang.Object setProperty(java.lang.String name,
int i)
name - property's keyi - property's setting
public java.lang.Object setProperty(java.lang.String name,
long l)
name - property's keyl - property's setting
public void setBooleanProperty(java.lang.String name,
boolean value)
name is the name of the property
value is the property's boolean setting
name - new boolean propertyvalue - new boolean propertypublic int getIntProperty(java.lang.String name)
name is the property's attribute (i.e., the left hand side of the AV pair)
name -
public long getLongProperty(java.lang.String name)
name is the property's attribute (i.e., the left hand side of the AV pair)
name -
public boolean getBooleanProperty(java.lang.String name)
name is the property's key or attribute (i.e., the left hand side of the AV pair)
name -
public boolean getBooleanProperty(java.lang.String name,
boolean dflt)
name is the property's key or attribute (i.e., the left hand side of the AV pair)
dflt is the default property if the property doesn't have a value
name - dflt -
public com.denova.util.PropertyList getPropertyListProperty(java.lang.String name)
name is the property's key or attribute (i.e., the left hand side of the AV pair)
name -
public com.denova.util.PropertyList getPropertyListProperty(java.lang.String name,
com.denova.util.PropertyList dflt)
name is the property's key or attribute (i.e., the left hand side of the AV pair)
dflt is the default property if the property doesn't have a value
name - dflt -
public void setPropertyListProperty(java.lang.String name,
com.denova.util.PropertyList value)
name is the property's key or attribute (i.e., the left hand side of the AV pair)
value is the property's new setting
name - new property list propertyvalue - new property list propertypublic java.lang.Object removeProperty(java.lang.String attribute)
attribute - property's key
public void clear()
clear in interface java.util.Mapclear in class java.util.Hashtablepublic void setPropertyList(com.denova.util.PropertyList p)
Removes all the old properties before adding the new ones.
p - new property listpublic void setProperties(java.util.Properties p)
Removes all the old properties before adding the new ones.
p - new properties
public boolean setProperties(java.awt.Container container,
com.denova.lang.FieldAccess fieldAccess)
Removes all the old properties before adding the new ones.
container - container with propertiesfieldAccess - new properties
public boolean setContainer(com.denova.lang.FieldAccess fieldAccess)
Manages threading.
fieldAccess - new container
public void addPropertyList(com.denova.util.PropertyList p)
p - The property list added.public void addProperties(java.util.Properties p)
p - The properties added.public java.util.Properties getPropertyList()
public java.util.Properties getProperties()
public void run()
run in interface java.lang.Runnablepublic java.lang.String toString()
This String can be used as the value for an attribute in another PropertyList.
toString in class java.util.Hashtablepublic boolean fromString(java.lang.String s)
s -
public java.lang.Exception getLastError()
If an error is detected, the high level must call clearLastError() to reset the lastError.
public void clearLastError()
If an error is detected, the high level must call clearLastError() to reset the lastError.
public java.util.Vector propertyNamesList()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||