com.apple.eawt.Application.setEnabledPreferencesMenu()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(111)

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

Application.setEnabledPreferencesMenu介绍

暂无

代码示例

代码示例来源:origin: stanfordnlp/CoreNLP

public static void enablePrefs(boolean enabled) {
 if (app == null) {
  app = new com.apple.eawt.Application();
 }
 app.setEnabledPreferencesMenu(enabled);
}

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

public GoMacLauncher() throws HeadlessException {
  application.addApplicationListener(new MyApplicationAdapter());
  application.setEnabledAboutMenu(true);
  application.setEnabledPreferencesMenu(false);
  setVisible(false);
  setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
  setResizable(false);
  setSize(getPreferredSize());
}

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

private MacBootstrapperApplicationAdapter initializeApplicationAdapter() {
  Application application = Application.getApplication();
  application.setEnabledPreferencesMenu(true);
  application.setEnabledAboutMenu(true);
  setVisible(false);
  setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
  setResizable(false);
  setSize(getPreferredSize());
  MacBootstrapperApplicationAdapter applicationAdapter = new MacBootstrapperApplicationAdapter(this);
  application.addApplicationListener(applicationAdapter);
  return applicationAdapter;
}

代码示例来源:origin: com.google.code.findbugs/findbugs

public static void enablePrefs(boolean enabled) {

    theApplication.setEnabledPreferencesMenu(enabled);
  }
}

代码示例来源:origin: raydac/netbeans-mmd-plugin

@Override
public boolean registerPlatformMenuEvent(@Nonnull final PlatformMenuEvent event, @Nonnull final PlatformMenuAction action) {
 this.actions.put(event, Assertions.assertNotNull(action));
 switch (event) {
  case ABOUT: {
   this.application.setEnabledAboutMenu(true);
  }
  break;
  case PREFERENCES: {
   this.application.setEnabledPreferencesMenu(true);
  }
  break;
 }
 return true;
}

代码示例来源:origin: net.imagej/ij

public void run(String arg) {
  Application app = new Application();
  app.setEnabledPreferencesMenu(true);
  app.addApplicationListener(this);
}

代码示例来源:origin: imagej/ImageJA

public void run(String arg) {
  Application app = new Application();
  app.setEnabledPreferencesMenu(true);
  app.addApplicationListener(this);
}

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

public EAWTHandler() {
  Application app = new Application();
  // Enable the 'About' menu item
  app.setEnabledAboutMenu(true);
  // Enable the 'Preferences' menu item
  app.setEnabledPreferencesMenu(true);
  // Register this ApplicationListener
  app.addApplicationListener(this);
}

代码示例来源:origin: antlr/antlrworks

protected void addPreferencesMenuItem() {
  Application.getApplication().addPreferencesMenuItem();
  Application.getApplication().setEnabledPreferencesMenu(true);
}

相关文章