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

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

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

JMenuBar.getUI介绍

暂无

代码示例

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

/**
 * Uninstalls <code>this</code> title pane.
 */
public void uninstall() {
  if ((this.menuBar != null) && (this.menuBar.getMenuCount() > 0)) {
    MenuBarUI menuBarUI = this.menuBar.getUI();
    if (menuBarUI instanceof SubstanceMenuBarUI) {
      SubstanceMenuBarUI ui = (SubstanceMenuBarUI) menuBarUI;
      if (ui.getMenuBar() == this.menuBar)
        menuBarUI.uninstallUI(this.menuBar);
    }
    SubstanceCoreUtilities.uninstallMenu(this.menuBar.getMenu(0));
    this.remove(menuBar);
    // fix for issue 362 - remove the buttons so that we don't
    // have duplicate buttons on internal frames in reparented
    // desktop panes
    this.remove(maxButton);
    this.remove(closeButton);
    this.remove(iconButton);
  }
  this.uninstallListeners();
  this.putClientProperty(UNINSTALLED, Boolean.TRUE);
}

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

/**
 * Uninstalls <code>this</code> title pane.
 */
public void uninstall() {
  if ((this.menuBar != null) && (this.menuBar.getMenuCount() > 0)) {
    MenuBarUI menuBarUI = this.menuBar.getUI();
    if (menuBarUI instanceof SubstanceMenuBarUI) {
      SubstanceMenuBarUI ui = (SubstanceMenuBarUI) menuBarUI;
      if (ui.getMenuBar() == this.menuBar)
        menuBarUI.uninstallUI(this.menuBar);
    }
    SubstanceCoreUtilities.uninstallMenu(this.menuBar.getMenu(0));
    this.remove(menuBar);
    // fix for issue 362 - remove the buttons so that we don't
    // have duplicate buttons on internal frames in reparented
    // desktop panes
    this.remove(maxButton);
    this.remove(closeButton);
    this.remove(iconButton);
  }
  this.uninstallListeners();
  this.putClientProperty(UNINSTALLED, Boolean.TRUE);
}
/**

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

/**
 * Uninstalls the necessary state.
 */
public void uninstall() {
  this.uninstallListeners();
  this.window = null;
  HeapStatusThread.unregisterPanel(this.heapStatusPanel);
  // Swing bug (?) - the updateComponentTree never gets to the
  // system menu (and in our case we have radio menu items with
  // rollover listeners). Fix for defect 109 - memory leak on skin
  // switch
  if ((this.menuBar != null) && (this.menuBar.getMenuCount() > 0)) {
    this.menuBar.getUI().uninstallUI(this.menuBar);
    SubstanceCoreUtilities.uninstallMenu(this.menuBar.getMenu(0));
  }
  if (this.heapStatusPanel != null) {
    for (MouseListener listener : this.heapStatusPanel
        .getMouseListeners())
      this.heapStatusPanel.removeMouseListener(listener);
    HeapStatusThread.unregisterPanel(this.heapStatusPanel);
    this.remove(this.heapStatusPanel);
  }
  if (this.menuBar != null)
    this.menuBar.removeAll();
  this.removeAll();
}

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

/**
 * Uninstalls the necessary state.
 */
public void uninstall() {
  this.uninstallListeners();
  this.window = null;
  HeapStatusThread.unregisterPanel(this.heapStatusPanel);
  // Swing bug (?) - the updateComponentTree never gets to the
  // system menu (and in our case we have radio menu items with
  // rollover listeners). Fix for defect 109 - memory leak on skin
  // switch
  if ((this.menuBar != null) && (this.menuBar.getMenuCount() > 0)) {
    this.menuBar.getUI().uninstallUI(this.menuBar);
    SubstanceCoreUtilities.uninstallMenu(this.menuBar.getMenu(0));
  }
  if (this.heapStatusPanel != null) {
    for (MouseListener listener : this.heapStatusPanel
        .getMouseListeners())
      this.heapStatusPanel.removeMouseListener(listener);
    HeapStatusThread.unregisterPanel(this.heapStatusPanel);
    this.remove(this.heapStatusPanel);
  }
  if (this.menuBar != null)
    this.menuBar.removeAll();
  this.removeAll();
}

相关文章