KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > beans > PropertyVetoException


1 /*
2  * @(#)PropertyVetoException.java 1.16 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.beans;
9
10  
11 /**
12  * A PropertyVetoException is thrown when a proposed change to a
13  * property represents an unacceptable value.
14  */

15
16 public
17 class PropertyVetoException extends Exception JavaDoc {
18
19  
20     /**
21      * Constructs a <code>PropertyVetoException</code> with a
22      * detailed message.
23      *
24      * @param mess Descriptive message
25      * @param evt A PropertyChangeEvent describing the vetoed change.
26      */

27     public PropertyVetoException(String JavaDoc mess, PropertyChangeEvent JavaDoc evt) {
28         super(mess);
29     this.evt = evt;
30     }
31
32      /**
33      * Gets the vetoed <code>PropertyChangeEvent</code>.
34      *
35      * @return A PropertyChangeEvent describing the vetoed change.
36      */

37     public PropertyChangeEvent JavaDoc getPropertyChangeEvent() {
38     return evt;
39     }
40
41     /**
42      * A PropertyChangeEvent describing the vetoed change.
43      * @serial
44      */

45     private PropertyChangeEvent JavaDoc evt;
46 }
47
Popular Tags