FileDocCategorySizeDatePackage
DefaultMenuLayout.javaAPI DocJava SE 6 API1897Tue Jun 10 00:26:48 BST 2008javax.swing.plaf.basic

DefaultMenuLayout

public class DefaultMenuLayout extends BoxLayout implements UIResource
The default layout manager for Popup menus and menubars. This class is an extension of BoxLayout which adds the UIResource tag so that plauggable L&Fs can distinguish it from user-installed layout managers on menus.
version
1.13 12/15/06
author
Georges Saab

Fields Summary
Constructors Summary
public DefaultMenuLayout(Container target, int axis)

	super(target, axis);
    
Methods Summary
public java.awt.DimensionpreferredLayoutSize(java.awt.Container target)

        if (target instanceof JPopupMenu) {
          ((JPopupMenu)target).putClientProperty(
                                 BasicMenuItemUI.MAX_ARROW_ICON_WIDTH, null);
          ((JPopupMenu)target).putClientProperty(
                                 BasicMenuItemUI.MAX_CHECK_ICON_WIDTH, null); 
          ((JPopupMenu)target).putClientProperty(
                                 BasicMenuItemUI.MAX_ICON_WIDTH, null);
          ((JPopupMenu)target).putClientProperty(
                                 BasicMenuItemUI.MAX_TEXT_WIDTH, null); 
          ((JPopupMenu)target).putClientProperty(
                                 BasicMenuItemUI.MAX_ACC_WIDTH, null);
          ((JPopupMenu)target).putClientProperty(
                                 BasicMenuItemUI.MAX_ICON_OFFSET, null);
          ((JPopupMenu)target).putClientProperty(
                                 BASICMENUITEMUI_MAX_TEXT_OFFSET, null);
        }
        return super.preferredLayoutSize(target);