Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.lib.propertyset
Interface PropertySet  view PropertySet download PropertySet.java

All Known Implementing Classes:
BasicPropertySet, UnmodifiablePropertySet

public interface PropertySet

A set of constrained properties. This is basically a hash table with several additional features: constraints on property values, default values, and listeners on state changes. In most cases, the BasicPropertySet implementation can be used.


Method Summary
 void addPropertySetListener(PropertySetListener listener)
          Add a PropertySetListener.
 java.lang.Object getDefaultValue(com.virtuosotechnologies.lib.base.ConstrainedKey key)
          Get the default value for a property, or null if there is no default.
 java.lang.Object getValue(com.virtuosotechnologies.lib.base.ConstrainedKey key)
          Get a property.
 void putValue(com.virtuosotechnologies.lib.base.ConstrainedKey key, java.lang.Object value)
          Set a property.
 void removePropertySetListener(PropertySetListener listener)
          Remove a PropertySetListener.
 void resetValue(com.virtuosotechnologies.lib.base.ConstrainedKey key)
          Reset a property to the default.
 

Method Detail

getValue

public java.lang.Object getValue(com.virtuosotechnologies.lib.base.ConstrainedKey key)
Get a property.


getDefaultValue

public java.lang.Object getDefaultValue(com.virtuosotechnologies.lib.base.ConstrainedKey key)
Get the default value for a property, or null if there is no default.


putValue

public void putValue(com.virtuosotechnologies.lib.base.ConstrainedKey key,
                     java.lang.Object value)
Set a property.


resetValue

public void resetValue(com.virtuosotechnologies.lib.base.ConstrainedKey key)
Reset a property to the default. Sets it to null if there is no default.


addPropertySetListener

public void addPropertySetListener(PropertySetListener listener)
Add a PropertySetListener. Listeners should be added via weak references.


removePropertySetListener

public void removePropertySetListener(PropertySetListener listener)
Remove a PropertySetListener. Does nothing if the listener is not already present.