java.awt
Interface LayoutManager

All Known Subinterfaces:
LayoutManager2
All Known Implementing Classes:
BasicComboBoxUI.ComboBoxLayoutManager, BasicInternalFrameTitlePane.TitlePaneLayout, BasicInternalFrameUI.InternalFrameLayout, BasicOptionPaneUI.ButtonAreaLayout, BasicScrollBarUI, BasicSplitPaneDivider.DividerLayout, BasicSplitPaneUI.BasicHorizontalLayoutManager, BasicSplitPaneUI.BasicVerticalLayoutManager, BasicTabbedPaneUI.TabbedPaneLayout, BorderLayout, BoxLayout, CardLayout, DefaultMenuLayout, FlowLayout, GridBagLayout, GridLayout, JRootPane.RootLayout, JSpinner.DateEditor, JSpinner.DefaultEditor, JSpinner.ListEditor, JSpinner.NumberEditor, MetalComboBoxUI.MetalComboBoxLayoutManager, MetalScrollBarUI, MetalTabbedPaneUI.TabbedPaneLayout, OverlayLayout, ScrollPaneLayout, ScrollPaneLayout.UIResource, SpringLayout, ViewportLayout

public interface LayoutManager

This interface is for laying out containers in a particular sequence.

Since:
1.0
See Also:
Container

Method Summary
 void addLayoutComponent(String name, Component component)
          Adds the specified component to the layout group.
 void layoutContainer(Container parent)
          Lays out the components in the given container.
 Dimension minimumLayoutSize(Container parent)
          Calculates the minimum size for this container, taking into account the components it contains.
 Dimension preferredLayoutSize(Container parent)
          Calculates the preferred size for this container, taking into account the components it contains.
 void removeLayoutComponent(Component component)
          Removes the specified component from the layout group.
 

Method Detail

addLayoutComponent

void addLayoutComponent(String name,
                        Component component)
Adds the specified component to the layout group.

Parameters:
name - the name of the component to add
component - the component to add

removeLayoutComponent

void removeLayoutComponent(Component component)
Removes the specified component from the layout group.

Parameters:
component - the component to remove

preferredLayoutSize

Dimension preferredLayoutSize(Container parent)
Calculates the preferred size for this container, taking into account the components it contains.

Parameters:
parent - the parent container to lay out
Returns:
the preferred dimensions of this container
See Also:
minimumLayoutSize(Container)

minimumLayoutSize

Dimension minimumLayoutSize(Container parent)
Calculates the minimum size for this container, taking into account the components it contains.

Parameters:
parent - the parent container to lay out
Returns:
the minimum dimensions of this container
See Also:
preferredLayoutSize(Container)

layoutContainer

void layoutContainer(Container parent)
Lays out the components in the given container.

Parameters:
parent - the container to lay out