// Kenneth J. Goldman // Washington University // 1997, All Rights Reserved // THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY // OF THE SOFTWARE, EITHER EXPRESSED OR IMPLIED. THE AUTHORS SHALL NOT BE // LIABLE FOR ANY DAMAGES SUFFERED AS A RESULT OF USING OR MODIFYING // THIS SOFTWARE OR ITS DERIVATIVE. import java.awt.*; public class FreeFormLayout implements LayoutManager { FreeFormLayout() { } /** * Adds the specified component with the specified name to * the layout. * @param name the component name * @param comp the component to be added */ public void addLayoutComponent(String name, Component comp) { } /** * Removes the specified component from the layout. * @param comp the component ot be removed */ public void removeLayoutComponent(Component comp) { } /** * Assumes that the preferred size dimensions for the specified * panel given the components is the dimension of the specified * parent container. * @param parent the component to be laid out * * @see #minimumLayoutSize */ public Dimension preferredLayoutSize(Container parent) { return new Dimension(parent.bounds().width, parent.bounds().height); } /** * Assumes that the minimum size dimensions for the specified * panel given the components in the size of the specified parent container. * @param parent the component to be laid out * @see #preferredLayoutSize */ public Dimension minimumLayoutSize(Container parent) { return preferredLayoutSize(parent); } /** * Lays out the container in the specified panel by leaving components * as is. (Does nothing.) * @param parent the component which needs to be laid out */ public void layoutContainer(Container parent) { } }