APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.plaf.basic

public Class DefaultMenuLayout

extends BoxLayout
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Known Direct Subclasses
javax.swing.plaf.synth.SynthMenuLayout
Annotations
@SuppressWarnings:serial
Imports
javax.swing.*, javax.swing.plaf.UIResource, java.awt.Container, .Dimension

The default layout manager for Popup menus and menubars. This class is an extension of BoxLayout which adds the UIResource tag so that pluggable L&Fs can distinguish it from user-installed layout managers on menus.
Author
Georges Saab

Field Summary

Inherited from javax.swing.BoxLayout:
LINE_AXISPAGE_AXISX_AXISY_AXIS

Constructor Summary

AccessConstructor and Description
public
DefaultMenuLayout(Container
the container that needs to be laid out
target
,
int
the axis to lay out components along. Can be one of: BoxLayout.X_AXIS, BoxLayout.Y_AXIS, BoxLayout.LINE_AXIS or BoxLayout.PAGE_AXIS
axis
)

Constructs a new instance of DefaultMenuLayout.

Method Summary

Modifier and TypeMethod and Description
public Dimension
preferredLayoutSize(Container target)

Overrides javax.swing.BoxLayout.preferredLayoutSize.

Implements java.awt.LayoutManager.preferredLayoutSize.

Returns the preferred dimensions for this layout, given the components in the specified target container.

Inherited from javax.swing.BoxLayout:
addLayoutComponentaddLayoutComponentgetAxisgetLayoutAlignmentXgetLayoutAlignmentYgetTargetinvalidateLayoutlayoutContainermaximumLayoutSizeminimumLayoutSizeremoveLayoutComponent

Constructor Detail

DefaultMenuLayoutback to summary
public DefaultMenuLayout(Container target, int axis)

Constructs a new instance of DefaultMenuLayout.

Parameters
target:Container

the container that needs to be laid out

axis:int

the axis to lay out components along. Can be one of: BoxLayout.X_AXIS, BoxLayout.Y_AXIS, BoxLayout.LINE_AXIS or BoxLayout.PAGE_AXIS

Method Detail

preferredLayoutSizeback to summary
public Dimension preferredLayoutSize(Container target)

Overrides javax.swing.BoxLayout.preferredLayoutSize.

Implements java.awt.LayoutManager.preferredLayoutSize.

Doc from javax.swing.BoxLayout.preferredLayoutSize.

Returns the preferred dimensions for this layout, given the components in the specified target container.