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

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

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

JMenuBar.setEnabled介绍

暂无

代码示例

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setEnabled(boolean aValue) {
  super.setEnabled(aValue);
}

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

@Override
  public void focusLost(FocusEvent e) {
//        // If we are not in the middle of a folder change, and focus has been
//        // lost then ensure location field's text is set to the current directory.
//        if (!folderPanel.isFolderChanging())
//            locationField.setText(folderPanel.getCurrentFolder().getAbsolutePath());

    // Enable menu bar when this component has lost focus
    folderPanel.getMainFrame().getJMenuBar().setEnabled(true);
  }

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

@Override
public void focusGained(FocusEvent e) {
  // Disable menu bar when this component has gained focus
  folderPanel.getMainFrame().getJMenuBar().setEnabled(false);
  // (upon focus) have text selected, so as to save the user the need to manually do so
  SwingUtilities.invokeLater(() -> LocationTextField.this.selectAll());
}

代码示例来源:origin: Syncleus/aparapi

fileMenu.add(closeMenuItem);
menuBar.add(fileMenu);
menuBar.setEnabled(true);
frame.setJMenuBar(menuBar);

代码示例来源:origin: org.boofcv/demonstrations

protected void setMenuBarEnabled( boolean enabled ) {
  menuBar.setEnabled(enabled);
  for (int i = 0; i < menuBar.getMenuCount(); i++) {
    menuBar.getMenu(i).setEnabled(enabled);
  }
}

代码示例来源:origin: Syncleus/aparapi

fileMenu.add(closeMenuItem);
menuBar.add(fileMenu);
menuBar.setEnabled(true);
frame.setJMenuBar(menuBar);

代码示例来源:origin: net.java.dev.appframework/appframework

if (menuBar != null) {
  menuBar.putClientProperty(this, menuBar.isEnabled());
  menuBar.setEnabled(false);
  boolean enabled = (Boolean)menuBar.getClientProperty(this);
  menuBar.putClientProperty(this, null);
  menuBar.setEnabled(enabled);

代码示例来源:origin: org.jdesktop.bsaf/bsaf

if (menuBar != null) {
  menuBar.putClientProperty(this, menuBar.isEnabled());
  menuBar.setEnabled(false);
  boolean enabled = (Boolean) menuBar.getClientProperty(this);
  menuBar.putClientProperty(this, null);
  menuBar.setEnabled(enabled);

相关文章