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