src/share/classes/java/beans/VetoableChangeSupport.java
Print this page
rev 10053 : 8044855: Add missing @since tag under java.beans.*
Reviewed-by:
@@ -75,10 +75,11 @@
* This class is serializable. When it is serialized it will save
* (and restore) any listeners that are themselves serializable. Any
* non-serializable listeners will be skipped during serialization.
*
* @see PropertyChangeSupport
+ * @since 1.1
*/
public class VetoableChangeSupport implements Serializable {
private VetoableChangeListenerMap map = new VetoableChangeListenerMap();
/**
@@ -189,10 +190,11 @@
* If <code>propertyName</code> or <code>listener</code> is null, no
* exception is thrown and no action is taken.
*
* @param propertyName The name of the property to listen on.
* @param listener The VetoableChangeListener to be added
+ * @since 1.2
*/
public void addVetoableChangeListener(
String propertyName,
VetoableChangeListener listener) {
if (listener == null || propertyName == null) {
@@ -214,10 +216,11 @@
* If <code>listener</code> is null, or was never added for the specified
* property, no exception is thrown and no action is taken.
*
* @param propertyName The name of the property that was listened on.
* @param listener The VetoableChangeListener to be removed
+ * @since 1.2
*/
public void removeVetoableChangeListener(
String propertyName,
VetoableChangeListener listener) {
if (listener == null || propertyName == null) {
@@ -290,10 +293,11 @@
*
* @param propertyName the programmatic name of the property that is about to change
* @param oldValue the old value of the property
* @param newValue the new value of the property
* @throws PropertyVetoException if one of listeners vetoes the property update
+ * @since 1.2
*/
public void fireVetoableChange(String propertyName, int oldValue, int newValue)
throws PropertyVetoException {
if (oldValue != newValue) {
fireVetoableChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
@@ -318,10 +322,11 @@
*
* @param propertyName the programmatic name of the property that is about to change
* @param oldValue the old value of the property
* @param newValue the new value of the property
* @throws PropertyVetoException if one of listeners vetoes the property update
+ * @since 1.2
*/
public void fireVetoableChange(String propertyName, boolean oldValue, boolean newValue)
throws PropertyVetoException {
if (oldValue != newValue) {
fireVetoableChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
@@ -341,10 +346,11 @@
* <p>
* No event is fired if the given event's old and new values are equal and non-null.
*
* @param event the {@code PropertyChangeEvent} to be fired
* @throws PropertyVetoException if one of listeners vetoes the property update
+ * @since 1.2
*/
public void fireVetoableChange(PropertyChangeEvent event)
throws PropertyVetoException {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
@@ -397,10 +403,11 @@
* those registered on all properties. If <code>propertyName</code>
* is null, only check for listeners registered on all properties.
*
* @param propertyName the property name.
* @return true if there are one or more listeners for the given property
+ * @since 1.2
*/
public boolean hasListeners(String propertyName) {
return this.map.hasListeners(propertyName);
}