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

Diff of /classpath/java/beans/PropertyVetoException.java

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

revision 1.6 by mark, Tue Jan 22 22:26:59 2002 UTC revision 1.7 by ericb, Sun Feb 24 04:25:16 2002 UTC
# Line 1  Line 1 
1  /* java.beans.PropertyVetoException  /* PropertyVetoException.java -- thrown to veto a proposed property change
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 39  exception statement from your version. * Line 39  exception statement from your version. *
39  package java.beans;  package java.beans;
40    
41  /**  /**
42   ** PropertyVetoException is thrown when a VetoableChangeListener doesn't like the proposed change.   * PropertyVetoException is thrown when a VetoableChangeListener doesn't
43   **   * like the proposed change.
44   ** @author John Keiser   *
45   ** @since JDK1.1   * @author John Keiser
46   ** @version 1.1.0, 31 May 1998   * @see VetoableChangeListener
47   ** @see java.beans.VetoableChangeListener   * @since 1.1
48   **/   * @status updated to 1.4
49     */
50  public class PropertyVetoException extends Exception {  public class PropertyVetoException extends Exception
51          PropertyChangeEvent evt;  {
52      /**
53          private static final long serialVersionUID = 129596057694162164L;     * Compatible with JDK 1.1+.
54       */
55          /** Instantiate this exception with the given message and property change.    private static final long serialVersionUID = 129596057694162164L;
56           ** @param msg the reason for the veto.  
57           ** @param changeEvent the PropertyChangeEvent that was thrown.    /**
58           **/     * The vetoed change.
59          public PropertyVetoException(String msg, PropertyChangeEvent changeEvent) {     *
60                  super(msg);     * @serial the event that was vetoed
61                  evt = changeEvent;     */
62          }    private final PropertyChangeEvent evt;
63    
64          /** Get the PropertyChange event that was vetoed. **/    /**
65          public PropertyChangeEvent getPropertyChangeEvent() {     * Instantiate this exception with the given message and property change.
66                  return evt;     *
67          }     * @param msg the reason for the veto
68       * @param changeEvent the PropertyChangeEvent that was thrown
69       */
70      public PropertyVetoException(String msg, PropertyChangeEvent changeEvent)
71      {
72        super(msg);
73        evt = changeEvent;
74      }
75    
76      /**
77       * Get the PropertyChange event that was vetoed.
78       *
79       * @return the vetoed change
80       */
81      public PropertyChangeEvent getPropertyChangeEvent()
82      {
83        return evt;
84      }
85  }  }

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

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