public static List<String> groupURLLinks;
static
{
+ // don't populate with session properties
+ Cache.disableSessionProperties();
+
// get links selected to be in the menu (SEQUENCE_LINKS)
// and links entered by the user but not selected (STORED_LINKS)
String inMenuString = Cache.getDefault("SEQUENCE_LINKS", "");
*/
groupURLLinks = new ArrayList<>();
+
+ // reenable
+ Cache.enableSessionProperties();
}
JInternalFrame frame;
private OptionsParam promptEachTimeOpt = new OptionsParam(
MessageManager.getString("label.prompt_each_time"),
- "Prompt each time");
+ LineartOptions.PROMPT_EACH_TIME);
private OptionsParam lineArtOpt = new OptionsParam(
MessageManager.getString("label.lineart"), "Lineart");
private Preferences()
{
super();
+ // don't populate with session properties
+ Cache.disableSessionProperties();
+
frame = new JInternalFrame();
- frame.setFrameIcon(WindowIcons.preferencesIcon);
+ frame.setFrameIcon(null);
frame.setContentPane(this);
if (!Platform.isJS())
/**
conservation.setSelected(Cache.getDefault("SHOW_CONSERVATION", true));
quality.setSelected(Cache.getDefault("SHOW_QUALITY", true));
identity.setSelected(Cache.getDefault("SHOW_IDENTITY", true));
+ ssConsensus.setSelected(Cache.getDefault("SHOW_SS_CONSENSUS", false));
openoverv.setSelected(Cache.getDefault("SHOW_OVERVIEW", false));
showUnconserved
.setSelected(Cache.getDefault("SHOW_UNCONSERVED", false));
* Set overview panel defaults
*/
gapColour.setBackground(Cache.getDefaultColour(GAP_COLOUR,
- jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP));
+ OverviewCanvas.OVERVIEW_DEFAULT_GAP));
hiddenColour.setBackground(Cache.getDefaultColour(HIDDEN_COLOUR,
- jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN));
+ OverviewCanvas.OVERVIEW_DEFAULT_HIDDEN));
useLegacyGap.setSelected(Cache.getDefault(USE_LEGACY_GAP, false));
gapLabel.setEnabled(!useLegacyGap.isSelected());
gapColour.setEnabled(!useLegacyGap.isSelected());
* Set Startup tab defaults
*/
+ // re-enable
+ Cache.enableSessionProperties();
}
/**
protected void setupOutputCombo(JComboBox<Object> comboBox,
String propertyKey)
{
+ Cache.disableSessionProperties();
+
comboBox.addItem(promptEachTimeOpt);
comboBox.addItem(lineArtOpt);
comboBox.addItem(textOpt);
{
comboBox.setSelectedItem(promptEachTimeOpt);
}
+
+ Cache.enableSessionProperties();
}
/**
@Override
public void ok_actionPerformed(ActionEvent e)
{
+ Cache.disableSessionProperties();
+
if (!validateSettings())
{
return;
/*
* Save Visual settings
*/
+
Cache.applicationProperties.setProperty("SHOW_JVSUFFIX",
Boolean.toString(seqLimit.isSelected()));
Cache.applicationProperties.setProperty("RIGHT_ALIGN_IDS",
Cache.applicationProperties.setProperty("SHOW_IDENTITY",
Boolean.toString(identity.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_SS_CONSENSUS",
+ Boolean.toString(ssConsensus.isSelected()));
+
Cache.applicationProperties.setProperty("GAP_SYMBOL",
gapSymbolCB.getSelectedItem().toString());
} catch (Exception ex)
{
}
+
+ Cache.enableSessionProperties();
}
public void saveProxySettings()
{
+ Cache.disableSessionProperties();
+
String newProxyType = customProxy.isSelected() ? Cache.PROXYTYPE_CUSTOM
: noProxy.isSelected() ? Cache.PROXYTYPE_NONE
: Cache.PROXYTYPE_SYSTEM;
wsPrefs.update++;
}
previousProxyType = newProxyType;
+
+ Cache.enableSessionProperties();
}
/**
@Override
public void startupFileTextfield_mouseClicked()
{
+ Cache.disableSessionProperties();
+
// TODO: JAL-3048 not needed for Jalview-JS
- String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT");
+ // default file format now determined by JalviewFileChooser
JalviewFileChooser chooser = JalviewFileChooser
- .forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat);
+ .forRead(Cache.getProperty("LAST_DIRECTORY"), null);
chooser.setFileView(new JalviewFileView());
chooser.setDialogTitle(
MessageManager.getString("label.select_startup_file"));
startupFileTextfield
.setText(chooser.getSelectedFile().getAbsolutePath());
}
+
+ Cache.enableSessionProperties();
}
/**
conservation.setEnabled(annotations.isSelected());
quality.setEnabled(annotations.isSelected());
identity.setEnabled(annotations.isSelected());
+ ssConsensus.setEnabled(annotations.isSelected());
showOccupancy.setEnabled(annotations.isSelected());
showGroupConsensus.setEnabled(annotations.isSelected());
showGroupConservation.setEnabled(annotations.isSelected());
boolean enabled = useLegacyGap.isSelected();
if (enabled)
{
- gapColour.setBackground(
- jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_LEGACY_GAP);
+ gapColour.setBackground(OverviewCanvas.OVERVIEW_DEFAULT_LEGACY_GAP);
}
else
{
- gapColour.setBackground(
- jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP);
+ gapColour.setBackground(OverviewCanvas.OVERVIEW_DEFAULT_GAP);
}
gapColour.setEnabled(!enabled);
gapLabel.setEnabled(!enabled);
useLegacyGap.setSelected(false);
useLegacyGaps_actionPerformed(null);
showHiddenAtStart.setSelected(false);
- hiddenColour.setBackground(
- jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_HIDDEN);
+ hiddenColour.setBackground(OverviewCanvas.OVERVIEW_DEFAULT_HIDDEN);
}
@Override
*/
String viewerPath = "";
List<String> paths = null;
+ Cache.disableSessionProperties();
try
{
ViewerType viewerType = ViewerType.valueOf(selectedItem);
{
// only valid entries should be in the drop-down
}
+ Cache.enableSessionProperties();
structureViewerPath.setText(viewerPath);
paths.add(0, structureViewerPath.getText());