提交 f405652e 编写于 作者: D denis

7020922: java.awt.Toolkit.getPropertyChangeListeners() should mention that it returns proxies

Reviewed-by: malenkov
上级 f627467b
...@@ -1870,11 +1870,15 @@ public abstract class Toolkit { ...@@ -1870,11 +1870,15 @@ public abstract class Toolkit {
/** /**
* Adds the specified property change listener for the named desktop * Adds the specified property change listener for the named desktop
* property. * property. When a {@link PropertyChangeListenerProxy} object is added,
* If pcl is null, no exception is thrown and no action is performed. * its property name is ignored, and the wrapped listener is added.
* If {@code name} is {@code null} or {@code pcl} is {@code null},
* no exception is thrown and no action is performed.
* *
* @param name The name of the property to listen for * @param name The name of the property to listen for
* @param pcl The property change listener * @param pcl The property change listener
* @see PropertyChangeSupport#addPropertyChangeListener(String,
PropertyChangeListener)
* @since 1.2 * @since 1.2
*/ */
public void addPropertyChangeListener(String name, PropertyChangeListener pcl) { public void addPropertyChangeListener(String name, PropertyChangeListener pcl) {
...@@ -1883,11 +1887,16 @@ public abstract class Toolkit { ...@@ -1883,11 +1887,16 @@ public abstract class Toolkit {
/** /**
* Removes the specified property change listener for the named * Removes the specified property change listener for the named
* desktop property. * desktop property. When a {@link PropertyChangeListenerProxy} object
* If pcl is null, no exception is thrown and no action is performed. * is removed, its property name is ignored, and
* the wrapped listener is removed.
* If {@code name} is {@code null} or {@code pcl} is {@code null},
* no exception is thrown and no action is performed.
* *
* @param name The name of the property to remove * @param name The name of the property to remove
* @param pcl The property change listener * @param pcl The property change listener
* @see PropertyChangeSupport#removePropertyChangeListener(String,
PropertyChangeListener)
* @since 1.2 * @since 1.2
*/ */
public void removePropertyChangeListener(String name, PropertyChangeListener pcl) { public void removePropertyChangeListener(String name, PropertyChangeListener pcl) {
...@@ -1896,12 +1905,15 @@ public abstract class Toolkit { ...@@ -1896,12 +1905,15 @@ public abstract class Toolkit {
/** /**
* Returns an array of all the property change listeners * Returns an array of all the property change listeners
* registered on this toolkit. * registered on this toolkit. The returned array
* contains {@code PropertyChangeListenerProxy} objects
* that associate listeners with the names of desktop properties.
* *
* @return all of this toolkit's <code>PropertyChangeListener</code>s * @return all of this toolkit's {@ code PropertyChangeListener}
* or an empty array if no property change * objects wrapped in {@code PropertyChangeListenerProxy} objects
* listeners are currently registered * or an empty array if no listeners are added
* *
* @see PropertyChangeSupport#getPropertyChangeListeners()
* @since 1.4 * @since 1.4
*/ */
public PropertyChangeListener[] getPropertyChangeListeners() { public PropertyChangeListener[] getPropertyChangeListeners() {
...@@ -1909,13 +1921,15 @@ public abstract class Toolkit { ...@@ -1909,13 +1921,15 @@ public abstract class Toolkit {
} }
/** /**
* Returns an array of all the <code>PropertyChangeListener</code>s * Returns an array of all property change listeners
* associated with the named property. * associated with the specified name of a desktop property.
* *
* @param propertyName the named property * @param propertyName the named property
* @return all of the <code>PropertyChangeListener</code>s associated with * @return all of the {@code PropertyChangeListener} objects
* the named property or an empty array if no such listeners have * associated with the specified name of a desktop property
* been added * or an empty array if no such listeners are added
*
* @see PropertyChangeSupport#getPropertyChangeListeners(String)
* @since 1.4 * @since 1.4
*/ */
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) { public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册