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

x33g5p2x  于2022-01-17 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(109)

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

ApplicationEvent.setHandled介绍

暂无

代码示例

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

@Override
public void handleAbout(ApplicationEvent ae) {
 if (mainApp != null) {
  ae.setHandled(true);
  mainApp.about();
 } else {
  throw new IllegalStateException("handleAbout: TregexGUI instance detached from listener");
 }
}

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

@Override
public void handlePreferences(ApplicationEvent ae) {
 if (mainApp != null) {
  mainApp.doPreferences();
  ae.setHandled(true);
 } else {
  throw new IllegalStateException("handlePreferences: TregexGUI instance detached from listener");
 }
}

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

@Override
public void handleQuit(ApplicationEvent ae) {
 if (mainApp != null) {
  /*  
  / You MUST setHandled(false) if you want to delay or cancel the quit.
  / This is important for cross-platform development -- have a universal quit
  / routine that chooses whether or not to quit, so the functionality is identical
  / on all platforms.  This example simply cancels the AppleEvent-based quit and
  / defers to that universal method.
  */
  ae.setHandled(false);
  TregexGUI.doQuit();
 } else {
  throw new IllegalStateException("handleQuit: TregexGUI instance detached from listener");
 }
}

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

public void handlePreferences(ApplicationEvent e) {
  if (prefPane == null) {
    prefPane = new MacPreferencesPane(agentMacWindow);
  }
  LOG.info("Got Preferences event");
  prefPane.ask();
  if (e != null) {
    e.setHandled(true);
  }
}

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

public void handleAbout(ApplicationEvent e) {
  if (aboutBox == null) {
    aboutBox = new MacAboutBox();
  }
  LOG.info("Got About event");
  aboutBox.setVisible(true);
  e.setHandled(true);
}

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

public void handleAbout(ApplicationEvent e) {
  if (aboutBox == null) {
    aboutBox = new MacAboutBox();
  }
  LOG.info("Got About describeChange");
  aboutBox.setResizable(false);
  aboutBox.setVisible(true);
  e.setHandled(true);
}

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

@Override
public void handlePreferences(ApplicationEvent ae) {
  if (mainApp != null) {
    mainApp.preferences();
    ae.setHandled(true);
  } else {
    throw new IllegalStateException("handlePreferences: MyApp instance " + "detached from listener");
  }
}

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

public void handleAbout(ApplicationEvent event) {
  IJ.run("About ImageJ...");
  event.setHandled(true);
}

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

public void handlePreferences(ApplicationEvent event) {
  event.setHandled(true);
  OSXIntegration.showPreferences();
}

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

@Override
public void handlePreferences(@Nonnull final ApplicationEvent ae) {
 ae.setHandled(processMenuEvent(PlatformMenuEvent.PREFERENCES));
}

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

public void handleAbout(ApplicationEvent event) {
  event.setHandled(true);
  OSXIntegration.showAbout();
}

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

public void handleQuit(ApplicationEvent event) {
  // Accept or reject the request to quit based on user's response
  event.setHandled(OSXIntegration.doQuit());
}

代码示例来源:origin: google/sagetv

public void handleQuit(ApplicationEvent event)
  {
    // call into sage.Sage to terminate
    System.out.println("MacApplicationListener.handleAbout");
    event.setHandled(true); // stop event propagation here...
    sage.SageTV.exit(false, 0);
  }
};

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

@Override
public void handleAbout(@Nonnull final ApplicationEvent ae) {
 ae.setHandled(processMenuEvent(PlatformMenuEvent.ABOUT));
}

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

@Override
public void handleQuit(@Nonnull final ApplicationEvent ae) {
 ae.setHandled(processMenuEvent(PlatformMenuEvent.QUIT));
}

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

@Override
public void handleReOpenApplication(@Nonnull final ApplicationEvent ae) {
 ae.setHandled(processMenuEvent(PlatformMenuEvent.REOPEN_APPLICATION));
}

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

public void handleAbout(ApplicationEvent e) {
  displayAbout();
  e.setHandled(true);
}

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

@Override
public void handleOpenFile(@Nonnull final ApplicationEvent ae) {
 ae.setHandled(processMenuEvent(PlatformMenuEvent.OPEN_FILE, ae.getFilename()));
}

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

@Override
public void handlePrintFile(@Nonnull final ApplicationEvent ae) {
 ae.setHandled(processMenuEvent(PlatformMenuEvent.PRINT_FILE, ae.getFilename()));
}

代码示例来源:origin: google/sagetv

public void handleAbout(ApplicationEvent event)
{
  System.out.println("MacApplicationListener.handleAbout");
  event.setHandled(true); // stop event propagation here...
  
  if(aboutBox == null) aboutBox = new sage.MacAboutBox();
  
  // get/set background (splash) image...
  
  aboutBox.setResizable(false);
  aboutBox.setVisible(true);
}

相关文章

微信公众号

最新文章

更多