1999N/A/*
2362N/A * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
1999N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1999N/A *
1999N/A * This code is free software; you can redistribute it and/or modify it
1999N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
1999N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
1999N/A *
1999N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1999N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1999N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1999N/A * version 2 for more details (a copy is included in the LICENSE file that
1999N/A * accompanied this code).
1999N/A *
1999N/A * You should have received a copy of the GNU General Public License version
1999N/A * 2 along with this work; if not, write to the Free Software Foundation,
1999N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1999N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
1999N/A */
1999N/A
1999N/Apackage javax.swing.plaf.synth;
1999N/A
1999N/Aimport javax.swing.plaf.basic.DefaultMenuLayout;
1999N/Aimport javax.swing.JPopupMenu;
1999N/Aimport java.awt.Container;
1999N/Aimport java.awt.Dimension;
1999N/A
1999N/A/**
1999N/A * @inheritDoc
1999N/A *
1999N/A * @author Georges Saab
1999N/A */
1999N/A
1999N/Aclass SynthMenuLayout extends DefaultMenuLayout {
1999N/A public SynthMenuLayout(Container target, int axis) {
1999N/A super(target, axis);
1999N/A }
1999N/A
1999N/A public Dimension preferredLayoutSize(Container target) {
1999N/A if (target instanceof JPopupMenu) {
1999N/A JPopupMenu popupMenu = (JPopupMenu) target;
1999N/A popupMenu.putClientProperty(
1999N/A SynthMenuItemLayoutHelper.MAX_ACC_OR_ARROW_WIDTH, null);
1999N/A }
1999N/A
1999N/A return super.preferredLayoutSize(target);
1999N/A }
1999N/A}