javax.swing.JPopupMenu.getLayout()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中javax.swing.JPopupMenu.getLayout()方法的一些代码示例,展示了JPopupMenu.getLayout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.getLayout()方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:getLayout

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()));

相关文章

JPopupMenu类方法