本文整理了Java中com.apple.eawt.Application.setAboutHandler()
方法的一些代码示例,展示了Application.setAboutHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.setAboutHandler()
方法的具体详情如下:
包路径:com.apple.eawt.Application
类名称:Application
方法名:setAboutHandler
暂无
代码示例来源:origin: stackoverflow.com
public class Test implements com.apple.eawt.AboutHandler {
public Test() {
// comment these two lines to see the default About dialog
com.apple.eawt.Application app = com.apple.eawt.Application.getApplication();
app.setAboutHandler(this);
JFrame myFrame = new JFrame();
myFrame.setSize(200, 200);
myFrame.setVisible(true);
}
@Override
public void handleAbout(com.apple.eawt.AppEvent.AboutEvent ae) {
JFrame aboutFrame = new JFrame();
aboutFrame.setSize(200, 200);
aboutFrame.add(new JLabel("About"));
aboutFrame.pack();
aboutFrame.setVisible(true);
}
public static void main(String[] args) {
new Test();
}
}
代码示例来源:origin: stackoverflow.com
import javax.swing.*;
import com.apple.eawt.*;
import com.apple.eawt.AppEvent.*;
public class Foo
extends JPanel
implements AboutHandler
{
public static void main(String[] args)
throws Exception
{
Foo r = new Foo();
}
public Foo() {
Application.getApplication().setAboutHandler(this);
}
public void handleAbout(final AboutEvent e) {
JOptionPane.showMessageDialog(null, "hello, world");
}
}
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
macOSXApplication.setAboutHandler(new AboutHandler() {
@Override
public void handleAbout(AppEvent.AboutEvent evt) {
代码示例来源:origin: org.zaproxy/zap
app.setAboutHandler(new OSXAboutHandler());
app.setPreferencesHandler(new OSXPreferencesHandler());
代码示例来源:origin: org.scijava/scijava-plugins-platforms
public MacOSAppEventDispatcher(final Application app,
final EventService eventService)
{
this.eventService = eventService;
app.setAboutHandler(this);
app.setPreferencesHandler(this);
app.setPrintFileHandler(this);
app.setQuitHandler(this);
app.addAppEventListener(this);
app.setOpenFileHandler(this);
}
代码示例来源:origin: raydac/netbeans-mmd-plugin
public MacOSXAppHandler(@Nonnull final Application application) {
this.application = application;
application.setAboutHandler(new AboutHandler() {
@Override
public void handleAbout(AppEvent.AboutEvent ae) {
代码示例来源:origin: stackoverflow.com
app.setAboutHandler(this);
app.setPreferencesHandler(this);
app.setQuitHandler(this);
代码示例来源:origin: org.cytoscape/swing-application-impl
application.setAboutHandler(new AboutHandler() {
@Override
public void handleAbout(AboutEvent event) {
代码示例来源:origin: edu.toronto.cs.savant/savant-core
try {
macOSXApplication = Application.getApplication();
macOSXApplication.setAboutHandler(new AboutHandler() {
@Override
public void handleAbout(AppEvent.AboutEvent evt) {
内容来源于网络,如有侵权,请联系作者删除!