import jalview.bin.Cache;
import jalview.gui.Help.HelpId;
import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.BackupFiles;
import jalview.io.FileFormatI;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
annotations_actionPerformed(null); // update the display of the annotation
// settings
+
+
+ /*
+ * Set Backups tab defaults
+ */
+ enableBackupFiles
+ .setSelected(Cache.getDefault(BackupFiles.ENABLED, true));
+ suffixTemplate.setText(Cache.getDefault(BackupFiles.SUFFIX,
+ ".v" + BackupFiles.NUM_PLACEHOLDER));
+ suffixDigitsSpinner
+ .setValue(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3));
+ suffixReverse.setSelected(
+ Cache.getDefault(BackupFiles.REVERSE_ORDER, false));
+ backupfilesKeepAll
+ .setSelected(Cache.getDefault(BackupFiles.NO_MAX, false));
+ backupfilesRollMaxSpinner
+ .setValue(Cache.getDefault(BackupFiles.ROLL_MAX, 4));
+ backupfilesConfirmDelete.setSelected(
+ Cache.getDefault(BackupFiles.CONFIRM_DELETE_OLD, true));
+ backupsOptionsSetEnabled(enableBackupFiles.isSelected());
+ updateBackupFilesExampleLabel();
+ /*
+ suffixPanel.setPreferredSize(
+ new Dimension(width, suffixPanel.getHeight()));
+ keepfilesPanel.setPreferredSize(
+ new Dimension(width, keepfilesPanel.getHeight()));
+ exampleFilesPanel.setPreferredSize(
+ new Dimension(width, exampleFilesPanel.getHeight()));
+ */
+
}
/**
Boolean.toString(padGaps.isSelected()));
wsPrefs.updateAndRefreshWsMenuConfig(false);
+
+ /*
+ * Save Backups settings
+ */
+ Cache.applicationProperties.setProperty(BackupFiles.CONFIRM_DELETE_OLD,
+ Boolean.toString(backupfilesConfirmDelete.isSelected()));
+ Cache.applicationProperties.setProperty(BackupFiles.ENABLED,
+ Boolean.toString(enableBackupFiles.isSelected()));
+ Cache.applicationProperties.setProperty(BackupFiles.NO_MAX,
+ Boolean.toString(backupfilesKeepAll.isSelected()));
+ Cache.applicationProperties.setProperty(BackupFiles.REVERSE_ORDER,
+ Boolean.toString(suffixReverse.isSelected()));
+ Cache.applicationProperties.setProperty(BackupFiles.SUFFIX,
+ suffixTemplate.getText());
+ Cache.applicationProperties.setProperty(BackupFiles.ROLL_MAX,
+ Integer.toString(getSpinnerInt(backupfilesRollMaxSpinner, 4)));
+ Cache.applicationProperties.setProperty(BackupFiles.SUFFIX_DIGITS,
+ Integer.toString(getSpinnerInt(suffixDigitsSpinner, 3)));
+
Cache.saveProperties();
Desktop.instance.doConfigureStructurePrefs();
try