1. /*
  2. * @(#)TreeWillExpandListener.java 1.8 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 javax.swing.event;
  8. import java.util.EventListener;
  9. import javax.swing.tree.ExpandVetoException;
  10. /**
  11. * The listener that's notified when a tree expands or collapses
  12. * a node.
  13. * For further information and examples see
  14. * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>,
  15. * a section in <em>The Java Tutorial.</em>
  16. *
  17. * @version 1.8 01/23/03
  18. * @author Scott Violet
  19. */
  20. public interface TreeWillExpandListener extends EventListener {
  21. /**
  22. * Invoked whenever a node in the tree is about to be expanded.
  23. */
  24. public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException;
  25. /**
  26. * Invoked whenever a node in the tree is about to be collapsed.
  27. */
  28. public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException;
  29. }