javax.swing.JMenuItem.setMargin()方法的使用及代码示例

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

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

JMenuItem.setMargin介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

JMenuItem menu = new JMenuItem("My Menu");
menu.setMargin(new Insets(10, 10, 10, 10));

代码示例来源:origin: com.jidesoft/jide-oss

protected void uninstallDefaults() {
  _painter = null;
  LookAndFeel.uninstallBorder(menuItem);
  menuItem.setBorderPainted(oldBorderPainted);
  if (menuItem.getMargin() instanceof UIResource)
    menuItem.setMargin(null);
  if (arrowIcon instanceof UIResource)
    arrowIcon = null;
  if (checkIcon instanceof UIResource)
    checkIcon = null;
}

代码示例来源:origin: com.jidesoft/jide-oss

protected void uninstallDefaults() {
  // PORTING: add 1
  _painter = null;
  LookAndFeel.uninstallBorder(menuItem);
  menuItem.setBorderPainted(oldBorderPainted);
  if (menuItem.getMargin() instanceof UIResource)
    menuItem.setMargin(null);
  if (arrowIcon instanceof UIResource)
    arrowIcon = null;
  if (checkIcon instanceof UIResource)
    checkIcon = null;
}

代码示例来源:origin: com.jidesoft/jide-oss

protected void uninstallDefaults() {
  LookAndFeel.uninstallBorder(menuItem);
  menuItem.setBorderPainted(oldBorderPainted);
  if (menuItem.getMargin() instanceof UIResource)
    menuItem.setMargin(null);
  if (arrowIcon instanceof UIResource)
    arrowIcon = null;
  if (checkIcon instanceof UIResource)
    checkIcon = null;
}

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

/**	Uninstalls the defaults from the associated menu item */
protected void uninstallDefaults()
{
  LookAndFeel.uninstallBorder(menuItem);
  menuItem.setBorderPainted(oldBorderPainted);
  if (menuItem.getMargin() instanceof UIResource)
    menuItem.setMargin(null);
  if (arrowIcon instanceof UIResource)
    arrowIcon= null;
  if (checkIcon instanceof UIResource)
    checkIcon= null;
}

代码示例来源:origin: vasl-developers/vasl

m_MenuItem.setMargin(new Insets(0,0,0,0));

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

|| (menuItem.getMargin() instanceof UIResource))
menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));

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

menuItem.setMargin(insets);

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

menuItem.setMargin(insets);

代码示例来源:origin: com.jidesoft/jide-oss

if (menuItem.getMargin() == null ||
    (menuItem.getMargin() instanceof UIResource)) {
  menuItem.setMargin(UIDefaultsLookup.getInsets(prefix + ".margin"));

代码示例来源:origin: com.jidesoft/jide-oss

if (menuItem.getMargin() == null ||
    (menuItem.getMargin() instanceof UIResource)) {
  menuItem.setMargin(UIDefaultsLookup.getInsets(prefix + ".margin"));

代码示例来源:origin: com.jidesoft/jide-oss

menuItem.setMargin(UIDefaultsLookup.getInsets(prefix + ".margin"));

相关文章

JMenuItem类方法