import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
-import jalview.bin.Jalview;
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;
super();
frame = new JInternalFrame();
frame.setContentPane(this);
- if (!Jalview.isJS())
+ if (!Platform.isJS())
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ */
{
wsPrefs = new WsPreferences();
wsTab.add(wsPrefs, BorderLayout.CENTER);
gapLabel.setEnabled(!useLegacyGap.isSelected());
gapColour.setEnabled(!useLegacyGap.isSelected());
showHiddenAtStart
- .setSelected(Cache.getDefault(SHOW_OV_HIDDEN_AT_START, true));
+ .setSelected(Cache.getDefault(SHOW_OV_HIDDEN_AT_START, false));
/*
* Set Structure tab defaults.
annotations_actionPerformed(null); // update the display of the annotation
// settings
+
+
+ /*
+ * Set Backups tab defaults
+ */
+ loadLastSavedBackupsOptions();
}
/**
/*
* JalviewJS doesn't support Lineart so force it to Text
*/
- String defaultOption = Jalview.isJS() ? "Text"
+ String defaultOption = Platform.isJS() ? "Text"
: Cache.getDefault(propertyKey, "Prompt each time");
if (defaultOption.equalsIgnoreCase("Text"))
{
Cache.applicationProperties.setProperty("PAD_GAPS",
Boolean.toString(padGaps.isSelected()));
- if (!Jalview.isJS())
+ if (!Platform.isJS())
{
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
{
try
{
- if (!Jalview.isJS())
+ if (!Platform.isJS())
{
wsPrefs.updateWsMenuConfig(true);
wsPrefs.refreshWs_actionPerformed(e);
public void defaultBrowser_mouseClicked(MouseEvent e)
{
// TODO: JAL-3048 not needed for j2s
- /*
- * @j2sNative
+ if (!Platform.isJS()) // BH 2019
+ /**
+ * Java only
+ *
+ * @j2sIgnore
*/
{
JFileChooser chooser = new JFileChooser(".");
{
useLegacyGap.setSelected(false);
useLegacyGaps_actionPerformed(null);
- showHiddenAtStart.setSelected(true);
+ showHiddenAtStart.setSelected(false);
hiddenColour.setBackground(
jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN);
}