本文整理匯總了Java中com.apple.eawt.Application.setEnabledPreferencesMenu方法的典型用法代碼示例。如果您正苦於以下問題:Java Application.setEnabledPreferencesMenu方法的具體用法?Java Application.setEnabledPreferencesMenu怎麽用?Java Application.setEnabledPreferencesMenu使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.apple.eawt.Application
的用法示例。
在下文中一共展示了Application.setEnabledPreferencesMenu方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: integrate
import com.apple.eawt.Application; //導入方法依賴的package包/類
@SuppressWarnings("deprecation")
public static void integrate()
{
try
{
Application appleEawtApplication = Application.getApplication();
appleEawtApplication.setDockIconImage(ImageIO.read(new URL(JavaFxHelper.buildResourcePath("icon.png"))));
appleEawtApplication.setEnabledAboutMenu(false);
appleEawtApplication.setAboutHandler(null);
appleEawtApplication.setEnabledPreferencesMenu(false);
appleEawtApplication.setPreferencesHandler(null);
}
catch (Throwable e)
{
e.printStackTrace();
}
}
示例2: setCallback
import com.apple.eawt.Application; //導入方法依賴的package包/類
public void setCallback(OSXCallbackInterface callback) {
this.callback = callback;
Application app = Application.getApplication();
app.addApplicationListener(this);
app.setEnabledPreferencesMenu(false);
app.addAboutMenuItem();
app.setEnabledAboutMenu(true);
}
示例3: initializeApplicationAdapter
import com.apple.eawt.Application; //導入方法依賴的package包/類
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;
}