javax.swing.JMenuBar.getMaximumSize()方法的使用及代码示例

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

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

JMenuBar.getMaximumSize介绍

暂无

代码示例

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

public Dimension getMaximumSize()
  {   // HACK - Not sure why menu takes up 1/2 of screen...?
    return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height);
  }
};

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

public Dimension getMaximumSize()
  {   // HACK - Not sure why menu takes up 1/2 of screen...?
    return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height);
  }
};

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

public Dimension getMaximumSize()
  {   // HACK - Not sure why menu takes up 1/2 of screen...?
    return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height);
  }
};

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Returns the maximum amount of space the layout can use.
 *
 * @param target the Container for which this layout manager
 * is being used
 * @return a Dimension object containing the layout's maximum size
 */
public Dimension maximumLayoutSize(Container target) {
  Dimension rd, mbd;
  Insets i = rootPane.getInsets();
  Container contentPane = rootPane.getContentPane();
  JMenuBar menuBar = rootPane.getJMenuBar();
  if (menuBar != null && menuBar.isVisible()) {
    mbd = menuBar.getMaximumSize();
  } else {
    mbd = new Dimension(0, 0);
  }
  if (contentPane != null && contentPane.isVisible()) {
    rd = contentPane.getMaximumSize();
  } else {
    // This is silly, but should stop an overflow error
    rd = new Dimension(Integer.MAX_VALUE,
        Integer.MAX_VALUE - i.top - i.bottom - mbd.height - 1);
  }
  return new Dimension(Math.min(rd.width, mbd.width) + i.left + i.right,
      rd.height + mbd.height + i.top + i.bottom);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

int mbHeight = Integer.MAX_VALUE;
if (root.getJMenuBar() != null) {
  Dimension mbd = root.getJMenuBar().getMaximumSize();
  if (mbd != null) {
    mbWidth = mbd.width;

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

mbd = root.getJMenuBar().getMaximumSize();
if (mbd != null) {
 mbWidth = mbd.width;

代码示例来源:origin: khuxtable/seaglass

mbd = root.getJMenuBar().getMaximumSize();
if (mbd != null) {
  mbWidth  = mbd.width;

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

mbd = root.getMenuBar().getMaximumSize();
if (mbd != null)

代码示例来源:origin: com.github.insubstantial/substance

mbd = root.getJMenuBar().getMaximumSize();
if (mbd != null) {
  mbWidth = mbd.width;

代码示例来源:origin: org.java.net.substance/substance

mbd = root.getJMenuBar().getMaximumSize();
if (mbd != null) {
  mbWidth = mbd.width;

相关文章