下面列出了怎么用java.awt.desktop.QuitResponse的API类实例代码及写法,或者点击链接到github查看源代码。
@Override
public void handleQuitRequestWith(QuitEvent event, QuitResponse response) {
if (!UIUtilities.inModalState()) {
mAllowQuitIfNoSignificantWindowsOpen = false;
if (closeFrames(true)) {
if (closeFrames(false)) {
saveState();
response.performQuit();
return;
}
}
mAllowQuitIfNoSignificantWindowsOpen = true;
}
response.cancelQuit();
}
@Override
public void handleQuitRequestWith(QuitEvent e, QuitResponse response) {
handleQuit();
//need to do this otherwise the user will never be able to quit again
response.cancelQuit();
}
@Override
public void handleQuitRequestWith(final QuitEvent quitEvent, final QuitResponse quitResponse)
{
PCGenUIManager.closePCGen();
}
@Override
public void handleQuitRequestWith(final QuitEvent quitEvent, final QuitResponse quitResponse)
{
PCGenUIManager.closePCGen();
}