javax.swing.JMenu.updateUI()方法的使用及代码示例

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

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

JMenu.updateUI介绍

暂无

代码示例

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

/**
   * Resets the UI property with a value from the current look and feel.
   *
   * @see JComponent#updateUI
   */
  @Override
  public void updateUI() {
    ensureSafePopupMenuCreated();
    try {
      super.updateUI();
    } catch (Throwable t) {

    }
  }
}

代码示例来源:origin: robward-scisys/sldeditor

/** Refresh menu. */
private void refreshMenu() {
  if (menu != null) {
    // Remove the previous menu
    this.remove(menu);
  }
  this.menu = createMenu(dataSelectionList);
  Color color = UIManager.getColor(MENU_SELECTION_BACKGROUND);
  UIManager.put(MENU_SELECTION_BACKGROUND, UIManager.getColor("Menu.background"));
  menu.updateUI();
  UIManager.put(MENU_SELECTION_BACKGROUND, color);
  MenuItemListener localListener = new MenuItemListener();
  setListener(menu, localListener);
  add(menu);
}

代码示例来源:origin: sdedit/sdedit

/**
   * @see javax.swing.JMenuBar#updateUI()
   */
  @Override
  public void updateUI() {
    super.updateUI();
    if (categories != null) {
      for (JMenu menu : categories.values()) {
        menu.updateUI();
        for (int i = 0; i < menu.getItemCount(); i++) {
          menu.getItem(i).updateUI();
        }
      }
    }
  }
}

代码示例来源:origin: IanWraith/DMRDecode

audioDevicesMenu=buildAudioDevices();
audioMenu.add(audioDevicesMenu);
audioDevicesMenu.updateUI();
menuBar.add(audioMenu);

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

UIManager.put("Menu.selectionBackground", UIManager.getColor("Menu.background"));
UIManager.put("Menu.selectionBackground", color);
menu.updateUI();
MenuItemListener listener = new MenuItemListener();
setListener(menu, listener);

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

UIManager.put("Menu.selectionBackground", UIManager
  .getColor("Menu.background"));
menu.updateUI();
UIManager.put("Menu.selectionBackground", color);

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

UIManager.put("Menu.selectionBackground", UIManager.getColor("Menu.background"));
UIManager.put("Menu.selectionBackground", color);
menu.updateUI();
MenuItemListener listener = new MenuItemListener();
setListener(menu, listener);

相关文章