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;
JInternalFrame frame;
- DasSourceBrowser dasSource;
-
private WsPreferences wsPrefs;
private OptionsParam promptEachTimeOpt = new OptionsParam(
super();
frame = new JInternalFrame();
frame.setContentPane(this);
- dasSource = new DasSourceBrowser();
- dasTab.add(dasSource, BorderLayout.CENTER);
wsPrefs = new WsPreferences();
wsTab.add(wsPrefs, BorderLayout.CENTER);
int width = 500, height = 450;
autoIdWidth.setSelected(Cache.getDefault("FIGURE_AUTOIDWIDTH", false));
userIdWidth.setEnabled(!autoIdWidth.isSelected());
userIdWidthlabel.setEnabled(!autoIdWidth.isSelected());
- Integer wi = Cache.getIntegerProperty("FIGURE_USERIDWIDTH");
+ Integer wi = Cache.getIntegerProperty("FIGURE_FIXEDIDWIDTH");
userIdWidth.setText(wi == null ? "" : wi.toString());
+ // TODO: refactor to use common enum via FormatAdapter and allow extension
+ // for new flat file formats
blcjv.setSelected(Cache.getDefault("BLC_JVSUFFIX", true));
clustaljv.setSelected(Cache.getDefault("CLUSTAL_JVSUFFIX", true));
fastajv.setSelected(Cache.getDefault("FASTA_JVSUFFIX", true));
annotations_actionPerformed(null); // update the display of the annotation
// settings
+
+
+ /*
+ * Set Backups tab defaults
+ */
+ loadLastSavedBackupsOptions();
}
/**
Cache.applicationProperties.setProperty("FIGURE_AUTOIDWIDTH",
Boolean.toString(autoIdWidth.isSelected()));
userIdWidth_actionPerformed();
- Cache.applicationProperties.setProperty("FIGURE_USERIDWIDTH",
+ Cache.applicationProperties.setProperty("FIGURE_FIXEDIDWIDTH",
userIdWidth.getText());
/*
Cache.applicationProperties.setProperty("PAD_GAPS",
Boolean.toString(padGaps.isSelected()));
- dasSource.saveProperties(Cache.applicationProperties);
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.applicationProperties.setProperty(BackupFiles.NS+"_PRESET",
+ Integer.toString(getComboIntStringKey(backupfilesPresetsCombo)));
+
Cache.saveProperties();
Desktop.instance.doConfigureStructurePrefs();
try