IPropertySupport Interface

com.bea.ide.core
IPropertySupport Interface

public interface IPropertySupport

This is a general purpose interface to be implemented by classes that support properties. Properties are simply String:Value pairs that are bound to listeners so that change notifications can be sent out. The primary purpose of this interface is to allow generalized utilities to operate on all objects that support properties.


All Known Implementing Classes
DefaultDocument, JavaDocument, ControlDocument, ControlContainerDocument, DefaultSourceDocument, DefaultDocumentView
All Known Subinterfaces

Application.I, IDesignView, IDocument, IDocumentView, IProject, IRelatedDocument, ISourceDocument, ISourceView, IVersionedDocument, IWorkspace

Method Summary

public void
addPropertyChangeListener(String sProp, PropertyChangeListener pcl)
Adds the given listener to the object for the given property.
public void
addPropertyChangeListener(PropertyChangeListener pcl)
Adds the given listener to the object.
public Object
getProperty(String sProp)
Gets the value of a property on the object.
public void
removePropertyChangeListener(String sProp, PropertyChangeListener pcl)
Removes the given listener from the object for the given property.
public void
removePropertyChangeListener(PropertyChangeListener pcl)
Removes the given listener from the object for the given property.
public void
setProperty(String sProp, Object oValue)
Sets a property on the object to the given value.

Method Detail

addPropertyChangeListener(String, PropertyChangeListener) Method

public void addPropertyChangeListener(String sProp, 
                                      PropertyChangeListener pcl)
Adds the given listener to the object for the given property. Whenever the given property changes the listener will receive a PropertyChangeEvent.

Parameters

sProp
property to watch for changes
pcl
listener to notify when a change occurs

addPropertyChangeListener(PropertyChangeListener) Method

public void addPropertyChangeListener(PropertyChangeListener pcl)
Adds the given listener to the object. Whenever any property of the object changes the listener will receive a PropertyChangeEvent.

Parameters

pcl
listener to notify when a change occurs

getProperty(String) Method

public Object getProperty(String sProp)
Gets the value of a property on the object.

Parameters

sProp
Name of the property to get

Returns

The value of the specified property or null if the property has not been set. It is not possible to distinguish between a property that has not been set and one whose value has been set explicitly to null.

removePropertyChangeListener(String, PropertyChangeListener) Method

public void removePropertyChangeListener(String sProp, 
                                         PropertyChangeListener pcl)
Removes the given listener from the object for the given property. The listener must have been added using IPropertySupport.addPropertyChangeListener(String, PropertyChangeListener). This method will not remove listeners added using IPropertySupport.addPropertyChangeListener(PropertyChangeListener).

Parameters

sProp
property to watch for changes
pcl
listener to notify when a change occurs

removePropertyChangeListener(PropertyChangeListener) Method

public void removePropertyChangeListener(PropertyChangeListener pcl)
Removes the given listener from the object for the given property. The listener must have been added using IPropertySupport.addPropertyChangeListener(PropertyChangeListener). This method will not remove listeners added using IPropertySupport.addPropertyChangeListener(String, PropertyChangeListener).

Parameters

pcl
listener to notify when a change occurs

setProperty(String, Object) Method

public void setProperty(String sProp, 
                        Object oValue)
Sets a property on the object to the given value. This will notify all property change listeners that the value of the property has changed. Only the listeners for the specified property and listeners that did not specify a property will be notified.

Parameters

sProp
Name of the property to set
oValue
New value of the property