< prev index next >

src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java

Print this page

        

*** 89,101 **** pcSupport = new PropertyChangeSupport(beanContextChildPeer); vcSupport = new VetoableChangeSupport(beanContextChildPeer); } /** ! * Sets the <code>BeanContext</code> for ! * this <code>BeanContextChildSupport</code>. ! * @param bc the new value to be assigned to the <code>BeanContext</code> * property * @throws PropertyVetoException if the change is rejected */ public synchronized void setBeanContext(BeanContext bc) throws PropertyVetoException { if (bc == beanContext) return; --- 89,101 ---- pcSupport = new PropertyChangeSupport(beanContextChildPeer); vcSupport = new VetoableChangeSupport(beanContextChildPeer); } /** ! * Sets the {@code BeanContext} for ! * this {@code BeanContextChildSupport}. ! * @param bc the new value to be assigned to the {@code BeanContext} * property * @throws PropertyVetoException if the change is rejected */ public synchronized void setBeanContext(BeanContext bc) throws PropertyVetoException { if (bc == beanContext) return;
*** 135,174 **** if (beanContext != null) initializeBeanContextResources(); } /** ! * Gets the nesting <code>BeanContext</code> ! * for this <code>BeanContextChildSupport</code>. ! * @return the nesting <code>BeanContext</code> for ! * this <code>BeanContextChildSupport</code>. */ public synchronized BeanContext getBeanContext() { return beanContext; } /** * Add a PropertyChangeListener for a specific property. * The same listener object may be added more than once. For each * property, the listener will be invoked the number of times it was added * for that property. ! * If <code>name</code> or <code>pcl</code> is null, no exception is thrown * and no action is taken. * * @param name The name of the property to listen on ! * @param pcl The <code>PropertyChangeListener</code> to be added */ public void addPropertyChangeListener(String name, PropertyChangeListener pcl) { pcSupport.addPropertyChangeListener(name, pcl); } /** * Remove a PropertyChangeListener for a specific property. ! * If <code>pcl</code> was added more than once to the same event * source for the specified property, it will be notified one less time * after being removed. ! * If <code>name</code> is null, no exception is thrown * and no action is taken. ! * If <code>pcl</code> is null, or was never added for the specified * property, no exception is thrown and no action is taken. * * @param name The name of the property that was listened on * @param pcl The PropertyChangeListener to be removed */ --- 135,174 ---- if (beanContext != null) initializeBeanContextResources(); } /** ! * Gets the nesting {@code BeanContext} ! * for this {@code BeanContextChildSupport}. ! * @return the nesting {@code BeanContext} for ! * this {@code BeanContextChildSupport}. */ public synchronized BeanContext getBeanContext() { return beanContext; } /** * Add a PropertyChangeListener for a specific property. * The same listener object may be added more than once. For each * property, the listener will be invoked the number of times it was added * for that property. ! * If {@code name} or {@code pcl} is null, no exception is thrown * and no action is taken. * * @param name The name of the property to listen on ! * @param pcl The {@code PropertyChangeListener} to be added */ public void addPropertyChangeListener(String name, PropertyChangeListener pcl) { pcSupport.addPropertyChangeListener(name, pcl); } /** * Remove a PropertyChangeListener for a specific property. ! * If {@code pcl} was added more than once to the same event * source for the specified property, it will be notified one less time * after being removed. ! * If {@code name} is null, no exception is thrown * and no action is taken. ! * If {@code pcl} is null, or was never added for the specified * property, no exception is thrown and no action is taken. * * @param name The name of the property that was listened on * @param pcl The PropertyChangeListener to be removed */
*** 179,221 **** /** * Add a VetoableChangeListener for a specific property. * The same listener object may be added more than once. For each * property, the listener will be invoked the number of times it was added * for that property. ! * If <code>name</code> or <code>vcl</code> is null, no exception is thrown * and no action is taken. * * @param name The name of the property to listen on ! * @param vcl The <code>VetoableChangeListener</code> to be added */ public void addVetoableChangeListener(String name, VetoableChangeListener vcl) { vcSupport.addVetoableChangeListener(name, vcl); } /** ! * Removes a <code>VetoableChangeListener</code>. ! * If <code>pcl</code> was added more than once to the same event * source for the specified property, it will be notified one less time * after being removed. ! * If <code>name</code> is null, no exception is thrown * and no action is taken. ! * If <code>vcl</code> is null, or was never added for the specified * property, no exception is thrown and no action is taken. * * @param name The name of the property that was listened on ! * @param vcl The <code>VetoableChangeListener</code> to be removed */ public void removeVetoableChangeListener(String name, VetoableChangeListener vcl) { vcSupport.removeVetoableChangeListener(name, vcl); } /** * A service provided by the nesting BeanContext has been revoked. * * Subclasses may override this method in order to implement their own * behaviors. ! * @param bcsre The <code>BeanContextServiceRevokedEvent</code> fired as a * result of a service being revoked */ public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) { } /** --- 179,221 ---- /** * Add a VetoableChangeListener for a specific property. * The same listener object may be added more than once. For each * property, the listener will be invoked the number of times it was added * for that property. ! * If {@code name} or {@code vcl} is null, no exception is thrown * and no action is taken. * * @param name The name of the property to listen on ! * @param vcl The {@code VetoableChangeListener} to be added */ public void addVetoableChangeListener(String name, VetoableChangeListener vcl) { vcSupport.addVetoableChangeListener(name, vcl); } /** ! * Removes a {@code VetoableChangeListener}. ! * If {@code pcl} was added more than once to the same event * source for the specified property, it will be notified one less time * after being removed. ! * If {@code name} is null, no exception is thrown * and no action is taken. ! * If {@code vcl} is null, or was never added for the specified * property, no exception is thrown and no action is taken. * * @param name The name of the property that was listened on ! * @param vcl The {@code VetoableChangeListener} to be removed */ public void removeVetoableChangeListener(String name, VetoableChangeListener vcl) { vcSupport.removeVetoableChangeListener(name, vcl); } /** * A service provided by the nesting BeanContext has been revoked. * * Subclasses may override this method in order to implement their own * behaviors. ! * @param bcsre The {@code BeanContextServiceRevokedEvent} fired as a * result of a service being revoked */ public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) { } /**
*** 228,241 **** * */ public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) { } /** ! * Gets the <tt>BeanContextChild</tt> associated with this ! * <tt>BeanContextChildSupport</tt>. * ! * @return the <tt>BeanContextChild</tt> peer of this class */ public BeanContextChild getBeanContextChildPeer() { return beanContextChildPeer; } /** * Reports whether or not this class is a delegate of another. --- 228,241 ---- * */ public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) { } /** ! * Gets the {@code BeanContextChild} associated with this ! * {@code BeanContextChildSupport}. * ! * @return the {@code BeanContextChild} peer of this class */ public BeanContextChild getBeanContextChildPeer() { return beanContextChildPeer; } /** * Reports whether or not this class is a delegate of another.
*** 281,291 **** * pending change in the nesting BeanContext property value. * Returning false will cause setBeanContext to throw * PropertyVetoException. * @param newValue the new value that has been requested for * the BeanContext property ! * @return <code>true</code> if the change operation is to be vetoed */ public boolean validatePendingSetBeanContext(BeanContext newValue) { return true; } --- 281,291 ---- * pending change in the nesting BeanContext property value. * Returning false will cause setBeanContext to throw * PropertyVetoException. * @param newValue the new value that has been requested for * the BeanContext property ! * @return {@code true} if the change operation is to be vetoed */ public boolean validatePendingSetBeanContext(BeanContext newValue) { return true; }
*** 343,377 **** /* * fields */ /** ! * The <code>BeanContext</code> in which ! * this <code>BeanContextChild</code> is nested. */ public BeanContextChild beanContextChildPeer; /** ! * The <tt>PropertyChangeSupport</tt> associated with this ! * <tt>BeanContextChildSupport</tt>. */ protected PropertyChangeSupport pcSupport; /** ! * The <tt>VetoableChangeSupport</tt> associated with this ! * <tt>BeanContextChildSupport</tt>. */ protected VetoableChangeSupport vcSupport; /** * The bean context. */ protected transient BeanContext beanContext; /** * A flag indicating that there has been ! * at least one <code>PropertyChangeVetoException</code> * thrown for the attempted setBeanContext operation. */ protected transient boolean rejectedSetBCOnce; } --- 343,377 ---- /* * fields */ /** ! * The {@code BeanContext} in which ! * this {@code BeanContextChild} is nested. */ public BeanContextChild beanContextChildPeer; /** ! * The {@code PropertyChangeSupport} associated with this ! * {@code BeanContextChildSupport}. */ protected PropertyChangeSupport pcSupport; /** ! * The {@code VetoableChangeSupport} associated with this ! * {@code BeanContextChildSupport}. */ protected VetoableChangeSupport vcSupport; /** * The bean context. */ protected transient BeanContext beanContext; /** * A flag indicating that there has been ! * at least one {@code PropertyChangeVetoException} * thrown for the attempted setBeanContext operation. */ protected transient boolean rejectedSetBCOnce; }
< prev index next >