com.borland.primetime.properties
Class MapProperty
java.lang.Object
|
+--com.borland.primetime.properties.Property
|
+--com.borland.primetime.properties.MapProperty
- public class MapProperty
- extends Property
Instances of MapProperty are used to represent settings in a temporary
storage structure. Property values may be copied to some more permanent
structure by external mechanisms.
Constructor Summary |
MapProperty(java.lang.String category,
java.lang.String name)
Create a new MapProperty with the specified category and property name. |
MapProperty(java.lang.String category,
java.lang.String name,
java.lang.String defaultValue)
Create a new MapProperty with the specified category, property name and
default value. |
Method Summary |
void |
addPropertyListener(MapPropertyListener listener)
Adds a MapPropertyListener to the list of listeners that receive events. |
void |
firePropertyChange(java.util.Map map,
java.lang.String oldValue,
java.lang.String newValue)
Notifies all registered MapPropertyListeners that the value of the
property has been changed. |
java.lang.String |
getValue(java.util.Map map)
|
void |
removePropertyListener(MapPropertyListener listener)
Removes a MapPropertyListener from the list of listeners that receive
events. |
boolean |
setValue(java.util.Map map,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
defaultValue
protected java.lang.String defaultValue
MapProperty
public MapProperty(java.lang.String category,
java.lang.String name)
- Create a new MapProperty with the specified category and property name.
Assumes the property's default value is null.
MapProperty
public MapProperty(java.lang.String category,
java.lang.String name,
java.lang.String defaultValue)
- Create a new MapProperty with the specified category, property name and
default value.
setValue
public boolean setValue(java.util.Map map,
java.lang.String value)
- Parameters:
map
- The java.util.Map implementation used to store the value.value
- The desired parameter value, or null if the value should be
reset to its default.
getValue
public java.lang.String getValue(java.util.Map map)
- Parameters:
map
- The java.util.Map implementation used to store the value.- Returns:
- The stored parameter value, or the MapProperty's default value
if no value has been stored.
addPropertyListener
public void addPropertyListener(MapPropertyListener listener)
- Adds a MapPropertyListener to the list of listeners that receive events.
- Parameters:
listener
- The listener.
removePropertyListener
public void removePropertyListener(MapPropertyListener listener)
- Removes a MapPropertyListener from the list of listeners that receive
events.
- Parameters:
listener
- The listener.
firePropertyChange
public void firePropertyChange(java.util.Map map,
java.lang.String oldValue,
java.lang.String newValue)
- Notifies all registered MapPropertyListeners that the value of the
property has been changed.