Пример #1
0
 protected void handleModified() {
   if (Setup.isAutoSaveEnabled()) {
     storeValues();
     return;
   }
   if (OperationsXml.areFilesDirty()) {
     int result =
         javax.swing.JOptionPane.showOptionDialog(
             this,
             Bundle.getMessage("PromptQuitWindowNotWritten"),
             Bundle.getMessage("PromptSaveQuit"),
             javax.swing.JOptionPane.YES_NO_OPTION,
             javax.swing.JOptionPane.WARNING_MESSAGE,
             null, // icon
             new String[] {
               ResourceBundle.getBundle("jmri.util.UtilBundle").getString("WarnYesSave"), // NOI18N
               ResourceBundle.getBundle("jmri.util.UtilBundle").getString("WarnNoClose")
             }, // NOI18N
             ResourceBundle.getBundle("jmri.util.UtilBundle").getString("WarnYesSave"));
     if (result == javax.swing.JOptionPane.NO_OPTION) {
       return;
     }
     // user wants to save
     storeValues();
   }
 }