javax.swing.plaf.basic

Class DefaultMenuLayout

public class DefaultMenuLayout extends BoxLayout implements UIResource

The LayoutManager that is used in PopupMenus. This is a derived from {@link BoxLayout}.
Constructor Summary
DefaultMenuLayout(Container target, int axis)
Creates a new instance of DefaultMenuLayout.
Method Summary
DimensionpreferredLayoutSize(Container target)
Returns the preferred size for the layout of the menu.

Constructor Detail

DefaultMenuLayout

public DefaultMenuLayout(Container target, int axis)
Creates a new instance of DefaultMenuLayout.

Parameters: target the component that is laid out axis the axis along which the component is laid out

Method Detail

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Returns the preferred size for the layout of the menu.

Parameters: target the Container which's preferred size we calculate