You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
929 B
54 lines
929 B
/*
|
|
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
package javax.swing.plaf.synth;
|
|
|
|
import javax.swing.plaf.basic.DefaultMenuLayout;
|
|
import javax.swing.JPopupMenu;
|
|
import java.awt.Container;
|
|
import java.awt.Dimension;
|
|
|
|
/**
|
|
* {@inheritDoc}
|
|
*
|
|
* @author Georges Saab
|
|
*/
|
|
|
|
class SynthMenuLayout extends DefaultMenuLayout {
|
|
public SynthMenuLayout(Container target, int axis) {
|
|
super(target, axis);
|
|
}
|
|
|
|
public Dimension preferredLayoutSize(Container target) {
|
|
if (target instanceof JPopupMenu) {
|
|
JPopupMenu popupMenu = (JPopupMenu) target;
|
|
popupMenu.putClientProperty(
|
|
SynthMenuItemLayoutHelper.MAX_ACC_OR_ARROW_WIDTH, null);
|
|
}
|
|
|
|
return super.preferredLayoutSize(target);
|
|
}
|
|
}
|