本文整理了Java中javax.swing.JPopupMenu.getLayout()
方法的一些代码示例,展示了JPopupMenu.getLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.getLayout()
方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:getLayout
暂无
代码示例来源:origin: khuxtable/seaglass
public void installDefaults() {
if (popupMenu.getLayout() == null || popupMenu.getLayout() instanceof UIResource) {
popupMenu.setLayout(new DefaultMenuLayout(popupMenu, BoxLayout.Y_AXIS));
popupMenu.setOpaque(false);
}
updateStyle(popupMenu);
}
代码示例来源:origin: khuxtable/seaglass
protected void uninstallDefaults() {
SeaGlassContext context = getContext(popupMenu, ENABLED);
style.uninstallDefaults(context);
context.dispose();
style = null;
if (popupMenu.getLayout() instanceof UIResource) {
popupMenu.setLayout(null);
}
}
代码示例来源:origin: net.sf.cuf/cuf-swing
Dimension popupsize = popup.getLayout().preferredLayoutSize(popup);
代码示例来源:origin: com.jidesoft/jide-oss
final SimpleScrollPane contents = new SimpleScrollPane(popupMenu, SimpleScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, SimpleScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
if (popupMenu instanceof JidePopupMenu && popupMenu.getPreferredSize().height != ((JidePopupMenu) popupMenu).getPreferredScrollableViewportSize().height) {
if (popupMenu.getLayout() instanceof DefaultMenuLayout && SystemInfo.isJdk6Above()) {
popupMenu.setLayout(new BoxLayout(popupMenu, ((DefaultMenuLayout) popupMenu.getLayout()).getAxis()));
内容来源于网络,如有侵权,请联系作者删除!