1. /*
  2. * @(#)PropertyVetoException.java 1.13 00/02/02
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.beans;
  11. /**
  12. * A PropertyVetoException is thrown when a proposed change to a
  13. * property represents an unacceptable value.
  14. */
  15. public
  16. class PropertyVetoException extends Exception {
  17. /**
  18. * Constructs a <code>PropertyVetoException</code> with a
  19. * detailed message.
  20. *
  21. * @param mess Descriptive message
  22. * @param evt A PropertyChangeEvent describing the vetoed change.
  23. */
  24. public PropertyVetoException(String mess, PropertyChangeEvent evt) {
  25. super(mess);
  26. this.evt = evt;
  27. }
  28. /**
  29. * Gets the vetoed <code>PropertyChangeEvent</code>.
  30. *
  31. * @return A PropertyChangeEvent describing the vetoed change.
  32. */
  33. public PropertyChangeEvent getPropertyChangeEvent() {
  34. return evt;
  35. }
  36. /**
  37. * A PropertyChangeEvent describing the vetoed change.
  38. * @serial
  39. */
  40. private PropertyChangeEvent evt;
  41. }