KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > tree > ExpandVetoException


1 /*
2  * @(#)ExpandVetoException.java 1.10 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 javax.swing.tree;
9
10 import javax.swing.event.TreeExpansionEvent JavaDoc;
11
12 /**
13  * Exception used to stop and expand/collapse from happening.
14  * See <a
15  href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>
16  * in <em>The Java Tutorial</em>
17  * for further information and examples.
18  *
19  * @version 1.10 12/19/03
20  * @author Scott Violet
21  */

22 public class ExpandVetoException extends Exception JavaDoc {
23     /** The event that the exception was created for. */
24     protected TreeExpansionEvent JavaDoc event;
25
26     /**
27      * Constructs an ExpandVetoException object with no message.
28      *
29      * @param event a TreeExpansionEvent object
30      */

31
32     public ExpandVetoException(TreeExpansionEvent JavaDoc event) {
33     this(event, null);
34     }
35
36     /**
37      * Constructs an ExpandVetoException object with the specified message.
38      *
39      * @param event a TreeExpansionEvent object
40      * @param message a String containing the message
41      */

42     public ExpandVetoException(TreeExpansionEvent JavaDoc event, String JavaDoc message) {
43     super(message);
44     this.event = event;
45     }
46 }
47
Popular Tags