1 /* 2 * @(#)HierarchyBoundsAdapter.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 /** 11 * An abstract adapter class for receiving ancestor moved and resized events. 12 * The methods in this class are empty. This class exists as a 13 * convenience for creating listener objects. 14 * <p> 15 * Extend this class and override the method for the event of interest. (If 16 * you implement the <code>HierarchyBoundsListener</code> interface, you have 17 * to define both methods in it. This abstract class defines null methods for 18 * them both, so you only have to define the method for the event you care 19 * about.) 20 * <p> 21 * Create a listener object using your class and then register it with a 22 * Component using the Component's <code>addHierarchyBoundsListener</code> 23 * method. When the hierarchy to which the Component belongs changes by 24 * resize or movement of an ancestor, the relevant method in the listener 25 * object is invoked, and the <code>HierarchyEvent</code> is passed to it. 26 * 27 * @author David Mendenhall 28 * @version 1.7, 12/19/03 29 * @see HierarchyBoundsListener 30 * @see HierarchyEvent 31 * @since 1.3 32 */ 33 public abstract class HierarchyBoundsAdapter implements HierarchyBoundsListener 34 { 35 /** 36 * Called when an ancestor of the source is moved. 37 */ 38 public void ancestorMoved(HierarchyEvent e) {} 39 40 /** 41 * Called when an ancestor of the source is resized. 42 */ 43 public void ancestorResized(HierarchyEvent e) {} 44 } 45