com.togethersoft.openapi.util.properties
Class DictionaryProperties

Direct Known Subclasses:
IdeCommandConstraints

public class DictionaryProperties
implements IProperties

Represents a number of properties as a dictionary.

Author:
TogetherSoft

Constructor Summary
DictionaryProperties(Dictionary impl)
           Creates new dictionary of properties on the base of existing.
DictionaryProperties()
           Creates empty dictionary of properties.

Method Summary
 voidaddPropertyChangeListener(PropertyChangeListener listener)
           Add a PropertyChangeListener to the listener list.
 voidaddVetoableChangeListener(VetoableChangeListener listener)
           Add a VetoableListener to the listener list.
 voidclear()
           Puts null value to all of the properties.
 protected voidfirePropertyChange(String key, String oldValue, String value)
           
 protected voidfirePropertyChange(String key, String oldValue)
           
 protected voidfireVetoableChange(String key, String oldValue, String value)
           
 protected voidfireVetoableChange(String key, String value)
           
 protected DictionarygetImplementation()
           
 StringgetProperty(String key, String defaultValue)
           Gets a property with the specified key and default.
 EnumerationpropertyNames()
           Returns an enumeration of all the keys in this property list, including the keys in the default property list.
 voidputProperty(String key, String value)
           Puts a property value to the specified key.
 voidremovePropertyChangeListener(PropertyChangeListener listener)
           Remove a PropertyChangeListener from the listener list.
 voidremoveVetoableChangeListener(VetoableChangeListener listener)
           Remove a VetoableChangeListener from the listener list.

Constructor Detail

DictionaryProperties

public DictionaryProperties(Dictionary impl)
Creates new dictionary of properties on the base of existing.

DictionaryProperties

public DictionaryProperties()
Creates empty dictionary of properties.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
Parameters:
listener - The PropertyChangeListener to be added

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
Add a VetoableListener to the listener list.
Parameters:
listener - The VetoableChangeListener to be added

clear

public void clear()
Puts null value to all of the properties.

firePropertyChange

protected void firePropertyChange(String key, String oldValue, String value)

firePropertyChange

protected void firePropertyChange(String key, String oldValue)

fireVetoableChange

protected void fireVetoableChange(String key, String oldValue, String value)
throws java.beans.PropertyVetoException

fireVetoableChange

protected void fireVetoableChange(String key, String value)
throws java.beans.PropertyVetoException

getImplementation

protected Dictionary getImplementation()

getProperty

public String getProperty(String key, String defaultValue)
Gets a property with the specified key and default. If the key is not found in this property list, tries the defaults. This method returns defaultValue if the property is not found.
See Also:
java.util.Properties.getProperty(java.lang.String)

propertyNames

public Enumeration propertyNames()
Returns an enumeration of all the keys in this property list, including the keys in the default property list.
Returns: an enumeration of all the keys in this property list, including the keys in the default property list.

putProperty

public void putProperty(String key, String value)
Puts a property value to the specified key. The key and the element cannot be null.
Parameters:
key - the specified key in the hashtable
value - the specified element
Returns: the old value of the key, or null if it did not have one.
Throws:
NullPointerException - If the value of the element is equal to null.
See Also:
java.util.Hashtable.put(java.lang.Object,java.lang.Object)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
Parameters:
listener - The PropertyChangeListener to be removed

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Remove a VetoableChangeListener from the listener list.
Parameters:
listener - The VetoableChangeListener to be removed

Association Links

to Class java.beans.PropertyChangeSupport

to Class java.beans.VetoableChangeSupport

to Class java.util.Dictionary