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