1. /*
  2. * @(#)TreeWillExpandListener.java 1.4 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.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. *
  14. * @version 1.4 11/29/01
  15. * @author Scott Violet
  16. */
  17. public interface TreeWillExpandListener extends EventListener {
  18. /**
  19. * Invoked whenever a node in the tree is about to be expanded.
  20. */
  21. public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException;
  22. /**
  23. * Invoked whenever a node in the tree is about to be collapsed.
  24. */
  25. public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException;
  26. }