1. /*
  2. * @(#)LayoutManager.java 1.21 00/02/02
  3. *
  4. * Copyright 1995-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 java.awt;
  11. /**
  12. * Defines the interface for classes that know how to layout Containers.
  13. *
  14. * @see Container
  15. *
  16. * @version 1.21, 02/02/00
  17. * @author Sami Shaio
  18. * @author Arthur van Hoff
  19. */
  20. public interface LayoutManager {
  21. /**
  22. * Adds the specified component with the specified name to
  23. * the layout.
  24. * @param name the component name
  25. * @param comp the component to be added
  26. */
  27. void addLayoutComponent(String name, Component comp);
  28. /**
  29. * Removes the specified component from the layout.
  30. * @param comp the component to be removed
  31. */
  32. void removeLayoutComponent(Component comp);
  33. /**
  34. * Calculates the preferred size dimensions for the specified
  35. * panel given the components in the specified parent container.
  36. * @param parent the component to be laid out
  37. *
  38. * @see #minimumLayoutSize
  39. */
  40. Dimension preferredLayoutSize(Container parent);
  41. /**
  42. * Calculates the minimum size dimensions for the specified
  43. * panel given the components in the specified parent container.
  44. * @param parent the component to be laid out
  45. * @see #preferredLayoutSize
  46. */
  47. Dimension minimumLayoutSize(Container parent);
  48. /**
  49. * Lays out the container in the specified panel.
  50. * @param parent the component which needs to be laid out
  51. */
  52. void layoutContainer(Container parent);
  53. }