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