|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.properties.Property | +--com.borland.primetime.properties.GlobalProperty
Instances of GlobalProperty are used to represent global settings under the user's control. Property values are represented as strings and stored in a "user.properties" file.
Field Summary | |
protected java.lang.String |
defaultValue
The "default" value provided in the constructor or null if none. |
Fields inherited from class com.borland.primetime.properties.Property |
category, name |
Constructor Summary | |
GlobalProperty(java.lang.String category,
java.lang.String name)
Create a new GlobalProperty with the specified category and property name. |
|
GlobalProperty(java.lang.String category,
java.lang.String name,
java.lang.String defaultValue)
Create a new GlobalProperty with the specified category, property name and default value. |
Method Summary | |
void |
addPropertyListener(GlobalPropertyListener listener)
Adds a GlobalPropertyListener to the list of listeners that receive events. |
void |
firePropertyChange(java.lang.String oldValue,
java.lang.String newValue)
Notifies all registered GlobalPropertyListeners that the value of the property has been changed. |
java.lang.String |
getValue()
Fetches the current value of this property. |
static long |
getVersion()
Fetches the current version of this property. |
static void |
readProperties()
Reads the state of all GlobalProperty settings defined by the file "user.preferences" in the property settings directory. |
static void |
readProperties(java.io.InputStream input)
Reads the state of all GlobalProperty settings from the stream provided. |
void |
removePropertyListener(GlobalPropertyListener listener)
Removes a GlobalPropertyListener from the list of listeners that receive events. |
boolean |
setValue(java.lang.String value)
Change the current value of this property. |
static void |
writeProperties()
Writes the state of all non-default GlobalProperty settings to the file "user.preferences" in the property settings directory. |
static void |
writeProperties(java.io.OutputStream output)
Writes the current state of all non-default GlobalProperty settings to the stream provided. |
Methods inherited from class com.borland.primetime.properties.Property |
compareTo, equals, getPropertyCategory, getPropertyName, hashCode, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String defaultValue
Constructor Detail |
public GlobalProperty(java.lang.String category, java.lang.String name)
public GlobalProperty(java.lang.String category, java.lang.String name, java.lang.String defaultValue)
Method Detail |
public boolean setValue(java.lang.String value)
value
- The desired parameter value, or null if the value should be
reset to its default.public java.lang.String getValue()
public void addPropertyListener(GlobalPropertyListener listener)
listener
- The listener to be added.public void removePropertyListener(GlobalPropertyListener listener)
listener
- The listener to be removed.public void firePropertyChange(java.lang.String oldValue, java.lang.String newValue)
oldValue
- The prior value.newValue
- The new value.public static long getVersion()
public static void readProperties()
Note that while this process discards all existing GlobalProperty
values and reads a new set of value, it does not fire change events.
Typically this occurs only once during the initialization of the property
system, and all registered PropertyGroup instances are notified via the
PropertyGroup method initializeProperties
.
public static void writeProperties()
public static void readProperties(java.io.InputStream input)
Note that while this process discards all existing GlobalProperty
values and reads a new set of value, it does not fire change events.
Typically this occurs only once during the initialization of the property
system, and all registered PropertyGroup instances are notified via the
PropertyGroup method initializeProperties
.
input
- An open InputStream.public static void writeProperties(java.io.OutputStream output)
output
- An open OutputStream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |