if (dialog.shouldCancel()) {
// discard changes and DO NOT close
Application.getInstance().setQuittingApplication(false);
return false;
}
else if (dialog.shouldSave()) {
// save changes and close
ActionEvent e = new ActionEvent(
this,
ActionEvent.ACTION_PERFORMED,
"SaveAll");