javax.swing.plaf.basic
Class DefaultMenuLayout
java.lang.Object
javax.swing.BoxLayout
javax.swing.plaf.basic.DefaultMenuLayout
- All Implemented Interfaces:
- LayoutManager, LayoutManager2, Serializable, UIResource
public class DefaultMenuLayout
- extends BoxLayout
- implements UIResource
The LayoutManager that is used in PopupMenus. This is a derived from
BoxLayout
.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultMenuLayout
public DefaultMenuLayout(Container target,
int axis)
- Creates a new instance of DefaultMenuLayout.
- Parameters:
target
- the component that is laid outaxis
- the axis along which the component is laid out
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
- Returns the preferred size for the layout of the menu.
- Specified by:
preferredLayoutSize
in interface LayoutManager
- Overrides:
preferredLayoutSize
in class BoxLayout
- Parameters:
target
- the Container which's preferred size we calculate
- Returns:
- The dimension of the layout.
- See Also:
LayoutManager.minimumLayoutSize(Container)