|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
com.denova.util.PropertyList
public class 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(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. |
int |
getIntProperty(java.lang.String name,
int defaultValue)
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. |
PropertyList |
getPropertyListProperty(java.lang.String name)
Gets a PropertyList property. |
PropertyList |
getPropertyListProperty(java.lang.String name,
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. |
void |
setIntProperty(java.lang.String name,
int value)
Sets the int AV pair. |
void |
setLongProperty(java.lang.String name,
long value)
Sets the long AV pair. |
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(PropertyList p)
Sets the current PropertyList. |
void |
setPropertyListProperty(java.lang.String name,
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, load, loadFromXML, propertyNames, store, store, storeToXML, storeToXML, stringPropertyNames |
| 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 - key of the propertyvalue - property's setting
public void setIntProperty(java.lang.String name,
int value)
name - attribute of the propertyvalue - property's int setting
public void setLongProperty(java.lang.String name,
long value)
name - attribute of the propertyvalue - property's long settingpublic int getIntProperty(java.lang.String name)
name - property's attribute
public int getIntProperty(java.lang.String name,
int defaultValue)
name - property's attributedefaultValue - value if none defined.
public long getLongProperty(java.lang.String name)
name - property's attribute
public boolean getBooleanProperty(java.lang.String name)
name - property's key or attribute
public boolean getBooleanProperty(java.lang.String name,
boolean dflt)
name - property's key or attributedflt - default property if the property doesn't have a value
public PropertyList getPropertyListProperty(java.lang.String name)
name - property's key or attribute
public PropertyList getPropertyListProperty(java.lang.String name,
PropertyList dflt)
name - property's key or attributedflt - default property list if the property doesn't have a value
public void setPropertyListProperty(java.lang.String name,
PropertyList value)
name - property's key or attributevalue - property's new settingpublic java.lang.Object removeProperty(java.lang.String attribute)
attribute - property's key
public void clear()
clear in interface java.util.Map<java.lang.Object,java.lang.Object>clear in class java.util.Hashtable<java.lang.Object,java.lang.Object>public void setPropertyList(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(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.Hashtable<java.lang.Object,java.lang.Object>public 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 | ||||||||