1. /*
  2. * @(#)ExpandVetoException.java 1.5 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing.tree;
  8. import javax.swing.event.TreeExpansionEvent;
  9. /**
  10. * Exception used to stop and expand/collapse from happening.
  11. *
  12. * @version 1.5 11/29/01
  13. * @author Scott Violet
  14. */
  15. public class ExpandVetoException extends Exception {
  16. /** The event that the exception was created for. */
  17. protected TreeExpansionEvent event;
  18. /**
  19. * Constructs an ExpandVetoException object with no message.
  20. *
  21. * @param event a TreeExpansionEvent object
  22. */
  23. public ExpandVetoException(TreeExpansionEvent event) {
  24. this(event, null);
  25. }
  26. /**
  27. * Constructs an ExpandVetoException object with the specified message.
  28. *
  29. * @param event a TreeExpansionEvent object
  30. * @param message a String containing the message
  31. */
  32. public ExpandVetoException(TreeExpansionEvent event, String message) {
  33. super(message);
  34. this.event = event;
  35. }
  36. }