/[classpath]/classpath/java/beans/VetoableChangeListener.java
ViewVC logotype

Diff of /classpath/java/beans/VetoableChangeListener.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mark, Tue Jan 22 22:26:59 2002 UTC revision 1.6 by ericb, Mon Apr 1 03:00:07 2002 UTC
# Line 1  Line 1 
1  /* java.beans.VetoableChangeListener  /* VetoableChangeListener.java -- listen for a change which can be vetoed
2     Copyright (C) 1998, 2000 Free Software Foundation, Inc.     Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 7  GNU Classpath is free software; you can Line 7  GNU Classpath is free software; you can
7  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)  the Free Software Foundation; either version 2, or (at your option)
9  any later version.  any later version.
10    
11  GNU Classpath is distributed in the hope that it will be useful, but  GNU Classpath is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Line 41  package java.beans; Line 41  package java.beans;
41  import java.util.EventListener;  import java.util.EventListener;
42    
43  /**  /**
44   ** VetoableChangeListener allows a class to monitor   * VetoableChangeListener allows a class to monitor proposed changes to
45   ** proposed changes to properties of a Bean and, if   * properties of a Bean and, if desired, prevent them from occurring. A
46   ** desired, prevent them from occurring.<P>   * vetoableChange() event will be fired <em>after</em> the property change has
47   **   * been requested, but before it is permanent. If any listener rejects the
48   ** A vetoableChange() event will be fired <EM>before</EM>   * change by throwing the PropertyChangeException, a new vetoableChange()
49   ** the property has changed.  If any listener rejects the   * event will be fired to all listeners who received a vetoableChange() event
50   ** change by throwing the PropertyChangeException, a new   * in the first place, informing them to revert back to the old value.
51   ** vetoableChange() event will be fired to all listeners   * The value, of course, never actually changed.
52   ** who received a vetoableChange() event in the first   *
53   ** place informing them of a reversion to the old value.   * <p><strong>Note:</strong> This class may not be reliably used to determine
54   ** The value, of course, never actually changed.<P>   * whether a property has actually changed.  Use the PropertyChangeListener
55   **   * interface for that instead.
56   ** <STRONG>Note:</STRONG> This class may not be reliably   *
57   ** used to determine whether a property has actually   * @author John Keiser
58   ** changed.  Use the PropertyChangeListener interface   * @see java.beans.PropertyChangeListener
59   ** for that instead.   * @see java.beans.VetoableChangeSupport
60   **   * @since 1.1
61   ** @author John Keiser   * @status updated to 1.4
62   ** @version 1.1.0, 29 Jul 1998   */
  ** @since JDK1.1  
  ** @see java.beans.PropertyChangeListener  
  ** @see java.beans.VetoableChangeSupport  
  **/  
   
63  public interface VetoableChangeListener extends EventListener  public interface VetoableChangeListener extends EventListener
64  {  {
65    /** Fired before a Bean's property changes.    /**
66     ** @param e the change (containing the old and new values)     * Fired before a Bean's property changes.
67     ** @exception PropertyChangeException if the listener     *
68     **            does not desire the change to be made.     * @param e the change (containing the old and new values)
69     **/     * @throws PropertyVetoException if the change is vetoed by the listener
70    public abstract void vetoableChange(PropertyChangeEvent e)     */
71      throws PropertyVetoException;    void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException;
72  }  } // interface VetoableChangeListener

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26