1 /* 2 * @(#)HierarchyBoundsListener.java 1.7 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 java.awt.event; 9 10 import java.util.EventListener; 11 12 /** 13 * The listener interface for receiving ancestor moved and resized events. 14 * The class that is interested in processing these events either implements 15 * this interface (and all the methods it contains) or extends the abstract 16 * <code>HierarchyBoundsAdapter</code> class (overriding only the method of 17 * interest). 18 * The listener object created from that class is then registered with a 19 * Component using the Component's <code>addHierarchyBoundsListener</code> 20 * method. When the hierarchy to which the Component belongs changes by 21 * the resizing or movement of an ancestor, the relevant method in the listener 22 * object is invoked, and the <code>HierarchyEvent</code> is passed to it. 23 * <p> 24 * Hierarchy events are provided for notification purposes ONLY; 25 * The AWT will automatically handle changes to the hierarchy internally so 26 * that GUI layout works properly regardless of whether a 27 * program registers an <code>HierarchyBoundsListener</code> or not. 28 * 29 * @author David Mendenhall 30 * @version 1.7, 12/19/03 31 * @see HierarchyBoundsAdapter 32 * @see HierarchyEvent 33 * @since 1.3 34 */ 35 public interface HierarchyBoundsListener extends EventListener { 36 /** 37 * Called when an ancestor of the source is moved. 38 */ 39 public void ancestorMoved(HierarchyEvent e); 40 41 /** 42 * Called when an ancestor of the source is resized. 43 */ 44 public void ancestorResized(HierarchyEvent e); 45 } 46