import jalview.analysis.scoremodels.PIDModel;
import jalview.analysis.scoremodels.SimilarityParams;
+import jalview.bin.ApplicationSingletonProvider;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentOrder;
* from the first tobesorted position in the alignment. e.g. (a,tb2,b,tb1,c,tb3
* becomes a,tb1,tb2,tb3,b,c)
*/
-public class AlignmentSorter
+public class AlignmentSorter implements ApplicationSingletonI
{
+
+ private AlignmentSorter()
+ {
+ // private singleton
+ }
+
+ private static AlignmentSorter getInstance()
+ {
+ return (AlignmentSorter) ApplicationSingletonProvider
+ .getInstance(AlignmentSorter.class);
+ }
+
+ /**
+ * types of feature ordering: Sort by score : average score - or total score -
+ * over all features in region Sort by feature label text: (or if null -
+ * feature type text) - numerical or alphabetical Sort by feature density:
+ * based on counts - ignoring individual text or scores for each feature
+ */
+ public static final String FEATURE_SCORE = "average_score";
+
+ public static final String FEATURE_LABEL = "text";
+
+ public static final String FEATURE_DENSITY = "density";
+
/*
* todo: refactor searches to follow a basic pattern: (search property, last
* search state, current sort direction)
*/
- static boolean sortIdAscending = true;
+ boolean sortIdAscending = true;
- static int lastGroupHash = 0;
+ int lastGroupHash = 0;
- static boolean sortGroupAscending = true;
+ boolean sortGroupAscending = true;
- static AlignmentOrder lastOrder = null;
+ AlignmentOrder lastOrder = null;
- static boolean sortOrderAscending = true;
+ boolean sortOrderAscending = true;
- static TreeModel lastTree = null;
+ TreeModel lastTree = null;
- static boolean sortTreeAscending = true;
+ boolean sortTreeAscending = true;
- /*
+
+ /**
* last Annotation Label used for sort by Annotation score
*/
- private static String lastSortByAnnotation;
+ private String lastSortByAnnotation;
- /*
- * string hash of last arguments to sortByFeature
- * (sort order toggles if this is unchanged between sorts)
+ /**
+ * string hash of last arguments to sortByFeature (sort order toggles if this
+ * is unchanged between sorts)
*/
- private static String sortByFeatureCriteria;
+ private String sortByFeatureCriteria;
- private static boolean sortByFeatureAscending = true;
+ private boolean sortByFeatureAscending = true;
- private static boolean sortLengthAscending;
+ private boolean sortLengthAscending;
/**
* Sorts sequences in the alignment by Percentage Identity with the given
QuickSort.sort(ids, seqs);
- if (sortIdAscending)
+ AlignmentSorter as = getInstance();
+ if (as.sortIdAscending)
{
setReverseOrder(align, seqs);
}
setOrder(align, seqs);
}
- sortIdAscending = !sortIdAscending;
+ as.sortIdAscending = !as.sortIdAscending;
}
/**
QuickSort.sort(length, seqs);
- if (sortLengthAscending)
+ AlignmentSorter as = getInstance();
+
+ if (as.sortLengthAscending)
{
setReverseOrder(align, seqs);
}
setOrder(align, seqs);
}
- sortLengthAscending = !sortLengthAscending;
+ as.sortLengthAscending = !as.sortLengthAscending;
}
/**
// ORDERS BY GROUP SIZE
List<SequenceGroup> groups = new ArrayList<>();
- if (groups.hashCode() != lastGroupHash)
+ AlignmentSorter as = getInstance();
+
+ if (groups.hashCode() != as.lastGroupHash)
{
- sortGroupAscending = true;
- lastGroupHash = groups.hashCode();
+ as.sortGroupAscending = true;
+ as.lastGroupHash = groups.hashCode();
}
else
{
- sortGroupAscending = !sortGroupAscending;
+ as.sortGroupAscending = !as.sortGroupAscending;
}
// SORTS GROUPS BY SIZE
}
}
- if (sortGroupAscending)
+ if (as.sortGroupAscending)
{
setOrder(align, seqs);
}
// Get an ordered vector of sequences which may also be present in align
List<SequenceI> tmp = order.getOrder();
- if (lastOrder == order)
+ AlignmentSorter as = getInstance();
+
+ if (as.lastOrder == order)
{
- sortOrderAscending = !sortOrderAscending;
+ as.sortOrderAscending = !as.sortOrderAscending;
}
else
{
- sortOrderAscending = true;
+ as.sortOrderAscending = true;
}
- if (sortOrderAscending)
+ if (as.sortOrderAscending)
{
setOrder(align, tmp);
}
{
List<SequenceI> tmp = getOrderByTree(align, tree);
+ AlignmentSorter as = getInstance();
+
// tmp should properly permute align with tree.
- if (lastTree != tree)
+ if (as.lastTree != tree)
{
- sortTreeAscending = true;
- lastTree = tree;
+ as.sortTreeAscending = true;
+ as.lastTree = tree;
}
else
{
- sortTreeAscending = !sortTreeAscending;
+ as.sortTreeAscending = !as.sortTreeAscending;
}
- if (sortTreeAscending)
+ if (as.sortTreeAscending)
{
setOrder(align, tmp);
}
for (int i = 0; i < alignment.length; i++)
{
- ids[i] = (Float.valueOf(alignment[i].getName().substring(8)))
+ ids[i] = (new Float(alignment[i].getName().substring(8)))
.floatValue();
}
}
jalview.util.QuickSort.sort(scores, seqs);
- if (lastSortByAnnotation != scoreLabel)
+
+ AlignmentSorter as = getInstance();
+
+ if (as.lastSortByAnnotation != scoreLabel)
{
- lastSortByAnnotation = scoreLabel;
+ as.lastSortByAnnotation = scoreLabel;
setOrder(alignment, seqs);
}
else
}
/**
- * types of feature ordering: Sort by score : average score - or total score -
- * over all features in region Sort by feature label text: (or if null -
- * feature type text) - numerical or alphabetical Sort by feature density:
- * based on counts - ignoring individual text or scores for each feature
- */
- public static String FEATURE_SCORE = "average_score";
-
- public static String FEATURE_LABEL = "text";
-
- public static String FEATURE_DENSITY = "density";
-
- /**
* Sort sequences by feature score or density, optionally restricted by
* feature types, feature groups, or alignment start/end positions.
* <p>
}
}
+ boolean doSort = false;
+
if (FEATURE_SCORE.equals(method))
{
if (hasScores == 0)
}
}
}
- QuickSort.sortByDouble(scores, seqs, sortByFeatureAscending);
+ doSort = true;
}
else if (FEATURE_DENSITY.equals(method))
{
// System.err.println("Sorting on Density: seq "+seqs[i].getName()+
// " Feats: "+featureCount+" Score : "+scores[i]);
}
- QuickSort.sortByDouble(scores, seqs, sortByFeatureAscending);
+ doSort = true;
+ }
+ if (doSort)
+ {
+ QuickSort.sortByDouble(scores, seqs, getInstance().sortByFeatureAscending);
}
-
setOrder(alignment, seqs);
}
/*
* if resorting on the same criteria, toggle sort order
*/
- if (sortByFeatureCriteria == null
- || !scoreCriteria.equals(sortByFeatureCriteria))
+ AlignmentSorter as = getInstance();
+ if (as.sortByFeatureCriteria == null
+ || !scoreCriteria.equals(as.sortByFeatureCriteria))
{
- sortByFeatureAscending = true;
+ as.sortByFeatureAscending = true;
}
else
{
- sortByFeatureAscending = !sortByFeatureAscending;
+ as.sortByFeatureAscending = !as.sortByFeatureAscending;
}
- sortByFeatureCriteria = scoreCriteria;
+ as.sortByFeatureCriteria = scoreCriteria;
}
}
import jalview.api.AlignmentViewPanel;
import jalview.api.analysis.ScoreModelI;
+import jalview.bin.ApplicationSingletonProvider;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import jalview.io.DataSourceType;
import jalview.io.FileParse;
import jalview.io.ScoreMatrixFile;
/**
* A class that can register and serve instances of ScoreModelI
*/
-public class ScoreModels
+public class ScoreModels implements ApplicationSingletonI
{
- private final ScoreMatrix BLOSUM62;
-
- private final ScoreMatrix PAM250;
-
- private final ScoreMatrix DNA;
-
- private static ScoreModels instance;
-
- private Map<String, ScoreModelI> models;
-
/**
* Answers the singleton instance of this class, with lazy initialisation
* (built-in score models are loaded on the first call to this method)
*/
public static ScoreModels getInstance()
{
- if (instance == null)
- {
- instance = new ScoreModels();
- }
- return instance;
+ return (ScoreModels) ApplicationSingletonProvider.getInstance(ScoreModels.class);
}
/**
registerScoreModel(new FeatureDistanceModel());
}
+ private final ScoreMatrix BLOSUM62;
+
+ private final ScoreMatrix PAM250;
+
+ private final ScoreMatrix DNA;
+
+ private Map<String, ScoreModelI> models;
+
/**
* Tries to load a score matrix from the given resource file, and if
* successful, registers it.
*/
public void reset()
{
- instance = new ScoreModels();
+ ApplicationSingletonProvider.removeInstance(this.getClass());
}
/**
--- /dev/null
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+package jalview.bin;
+
+import jalview.util.Platform;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A class to hold singleton objects, whose scope (context) is
+ * <ul>
+ * <li>the Java runtime (JVM) when running as Java</li>
+ * <li>one 'applet', when running as JalviewJS</li>
+ * </ul>
+ * This allows separation of multiple JS applets running on the same browser
+ * page, each with their own 'singleton' instances.
+ * <p>
+ * Instance objects are held in a separate Map (keyed by Class) for each
+ * context. For Java, this is just a single static Map. For SwingJS, the map is
+ * stored as a field {@code _swingjsSingletons} of
+ * {@code Thread.currentThread.getThreadGroup()}, as a proxy for the applet.
+ * <p>
+ * Note that when an applet is stopped, its ThreadGroup is removed, allowing any
+ * singleton references to be garbage collected.
+ *
+ * @author hansonr
+ */
+public class ApplicationSingletonProvider
+{
+ /**
+ * A tagging interface to mark classes whose singleton instances may be served
+ * by {@code ApplicationSingletonProvider}, giving a distinct instance per JS
+ * 'applet'.
+ * <p>
+ * A class whose singleton should have global scope (be shared across all
+ * applets on a page) should <em>not</em> use this mechanism, but just provide
+ * a single instance (class static member) in the normal way.
+ */
+ public interface ApplicationSingletonI
+ {
+ }
+
+ /*
+ * Map used to hold singletons in JVM context
+ */
+ private static Map<Class<? extends ApplicationSingletonI>, ApplicationSingletonI> singletons = new HashMap<>();
+
+ /**
+ * private constructor for non-instantiable class
+ */
+ private ApplicationSingletonProvider()
+ {
+ }
+
+ /**
+ * Returns the singletons map for the current context (JVM for Java,
+ * ThreadGroup for JS), creating the map on the first request for each JS
+ * ThreadGroup
+ *
+ * @return
+ */
+ private static Map<Class<? extends ApplicationSingletonI>, ApplicationSingletonI> getContextMap()
+ {
+ @SuppressWarnings("unused")
+ ThreadGroup g = (Platform.isJS()
+ ? Thread.currentThread().getThreadGroup()
+ : null);
+ Map<Class<? extends ApplicationSingletonI>, ApplicationSingletonI> map = singletons;
+ /** @j2sNative map = g._swingjsSingletons; */
+ if (map == null)
+ {
+ map = new HashMap<>();
+ /** @j2sNative g._swingjsSingletons = map; */
+ }
+
+ return map;
+ }
+
+ /**
+ * Answers the singleton instance of the given class for the current context
+ * (JVM or SwingJS 'applet'). If no instance yet exists, one is created, by
+ * calling the class's no-argument constructor. Answers null if any error
+ * occurs (or occurred previously for the same class).
+ *
+ * @param c
+ * @return
+ */
+ public static ApplicationSingletonI getInstance(Class<? extends ApplicationSingletonI> c)
+ {
+ Map<Class<? extends ApplicationSingletonI>, ApplicationSingletonI> map = getContextMap();
+ if (map.containsKey(c))
+ {
+ /*
+ * singleton already created _or_ creation failed (null value stored)
+ */
+ return map.get(c);
+ }
+
+ /*
+ * create and save the singleton
+ */
+ ApplicationSingletonI o = map.get(c);
+ try
+ {
+ Constructor<? extends ApplicationSingletonI> con = c
+ .getDeclaredConstructor();
+ con.setAccessible(true);
+ o = con.newInstance();
+ } catch (IllegalAccessException | InstantiationException
+ | IllegalArgumentException | InvocationTargetException
+ | NoSuchMethodException | SecurityException e)
+ {
+ Cache.log.error("Failed to create singleton for " + c.toString()
+ + ", error was: " + e.toString());
+ e.printStackTrace();
+ }
+
+ /*
+ * store the new singleton; note that a
+ * null value is saved if construction failed
+ */
+ getContextMap().put(c, o);
+ return o;
+ }
+
+ /**
+ * Removes the current singleton instance of the given class from the current
+ * application context. This has the effect of ensuring that a new instance is
+ * created the next time one is requested.
+ *
+ * @param c
+ */
+ public static void removeInstance(
+ Class<? extends ApplicationSingletonI> c)
+ {
+ Map<Class<? extends ApplicationSingletonI>, ApplicationSingletonI> map = getContextMap();
+ if (map != null)
+ {
+ map.remove(c);
+ }
+ }
+}
*/
package jalview.bin;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import jalview.datamodel.PDBEntry;
import jalview.gui.UserDefinedColours;
import jalview.schemes.ColourSchemeLoader;
* @author $author$
* @version $Revision$
*/
-public class Cache
+public class Cache implements ApplicationSingletonI
{
+
+ private Cache()
+ {
+ // private singleton
+ }
+
+ /**
+ * In Java, this will be a static field instance, which will be
+ * application-specific; in JavaScript it will be an applet-specific instance
+ * tied to the applet's ThreadGroup.
+ *
+ * @return
+ */
+ public static Cache getInstance()
+ {
+ return (Cache) ApplicationSingletonProvider.getInstance(Cache.class);
+ }
+
/**
* property giving log4j level for CASTOR loggers
*/
public static Logger log;
/** Jalview Properties */
- private static Properties applicationProperties = new Properties()
+ private Properties applicationProperties = new Properties()
{
// override results in properties output in alphabetical order
@Override
*/
public static void loadProperties(String propsFile)
{
- /* for JalviewJS should be
-
- getInstance().
-
- */
- loadPropertiesImpl(propsFile);
-
+
+ getInstance().loadPropertiesImpl(propsFile);
+
}
- private /* JalviewJS should not be static */
- static //
- void loadPropertiesImpl(String propsFile)
+ private void loadPropertiesImpl(String propsFile)
{
-
+
propertiesFile = propsFile;
if (propsFile == null && !propsAreReadOnly)
{
}
if (authorDetails == null)
{
- applicationProperties.remove("AUTHORS");
- applicationProperties.remove("AUTHORFNAMES");
- applicationProperties.remove("YEAR");
+ applicationProperties.remove("AUTHORS");
+ applicationProperties.remove("AUTHORFNAMES");
+ applicationProperties.remove("YEAR");
}
loadBuildProperties(false);
String jnlpVersion = System.getProperty("jalview.version");
- // jnlpVersion will be null if a latest version check for the channel needs to
+ // jnlpVersion will be null if a latest version check for the channel needs
+ // to
// be done
// Dont do this check if running in headless mode
url = Cache.class.getResource(resourcePath).toString();
} catch (Exception ex)
{
- System.err.println("Failed to resolve resource " + resourcePath + ": "
- + ex.getMessage());
+ System.err.println("Failed to resolve resource " + resourcePath
+ + ": " + ex.getMessage());
}
}
else
return url;
}
- public static void loadBuildProperties(boolean reportVersion)
+ public void loadBuildProperties(boolean reportVersion)
{
String codeInstallation = getProperty("INSTALLATION");
boolean printVersion = codeInstallation == null;
new BuildDetails(codeVersion, null, codeInstallation);
if (printVersion && reportVersion)
{
- System.out
- .println("Jalview Version: " + codeVersion + codeInstallation);
+ System.out.println(
+ "Jalview Version: " + codeVersion + codeInstallation);
}
}
- private static void deleteBuildProperties()
+ private void deleteBuildProperties()
{
applicationProperties.remove("LATEST_VERSION");
applicationProperties.remove("VERSION");
*/
public static String getProperty(String key)
{
- String prop = /* for JalviewJS should be
-
- getInstance().
-
- */
- applicationProperties.getProperty(key);
-// if (prop == null && Platform.isJS())
-// {
-// prop = applicationProperties.getProperty(Platform.getUniqueAppletID()
-// + "_" + JS_PROPERTY_PREFIX + key);
-// }
+ String prop = getInstance().applicationProperties.getProperty(key);
+ // if (prop == null && Platform.isJS())
+ // {
+ // prop = applicationProperties.getProperty(Platform.getUniqueAppletID()
+ // + "_" + JS_PROPERTY_PREFIX + key);
+ // }
return prop;
}
*/
public static Object setProperty(String key, String obj)
{
- Object oldValue = null;
- try
- {
- oldValue = applicationProperties.setProperty(key, obj);
- if (propertiesFile != null && !propsAreReadOnly)
- {
- FileOutputStream out = new FileOutputStream(propertiesFile);
- applicationProperties.store(out, "---JalviewX Properties File---");
- out.close();
- }
- } catch (Exception ex)
- {
- System.out.println(
- "Error setting property: " + key + " " + obj + "\n" + ex);
- }
- return oldValue;
+ return getInstance().setPropertyImpl(key, obj, true);
}
/**
*/
public static void removeProperty(String key)
{
- /* for JalviewJS should be
-
- getInstance().
-
- */
- removePropertyImpl(key, true);
+ getInstance().removePropertyImpl(key, true);
}
/**
* Removes the named property for the running application, without saving the
* properties file
*
- * BH noting that ColourMenuHelper calls this. If the intent is to save,
- * then simply chanet that call to removeProperty(key).
+ * BH noting that ColourMenuHelper calls this. If the intent is to save, then
+ * simply chanet that call to removeProperty(key).
*
* @param key
*/
public static void removePropertyNoSave(String key)
{
- /* for JalviewJS should be
-
+
getInstance().
-
- */
- removePropertyImpl(key, false);
+
+ removePropertyImpl(key, false);
}
/**
* @param key
* @param andSave
*/
- private /* JalviewJS should not be static */
- static //
- void removePropertyImpl(String key, boolean andSave)
+ private void removePropertyImpl(String key, boolean andSave)
{
applicationProperties.remove(key);
if (andSave)
*/
public static void saveProperties()
{
+ getInstance().savePropertiesImpl();
+ }
+
+ /**
+ * save the properties to the jalview properties path
+ */
+ private void savePropertiesImpl()
+
+ {
if (!propsAreReadOnly)
{
try
* @param property
* @param colour
*/
- public static void setColourProperty(String property, Color colour)
+ public static void setColourPropertyNoSave(String property, Color colour)
{
- setProperty(property, jalview.util.Format.getHexString(colour));
+ setPropertyNoSave(property, jalview.util.Format.getHexString(colour));
}
/**
}
if (value == null || value.trim().length() < 1)
{
- Cache.applicationProperties.remove(propName);
+ getInstance().applicationProperties.remove(propName);
}
else
{
- Cache.applicationProperties.setProperty(propName, value);
+ getInstance().applicationProperties.setProperty(propName, value);
}
}
{
if (coloursFound.toString().length() > 1)
{
- /* for JalviewJS should be
-
- getInstance().
-
- */
setProperty(UserDefinedColours.USER_DEFINED_COLOURS,
coloursFound.toString());
}
else
{
- applicationProperties
+ getInstance().applicationProperties
.remove(UserDefinedColours.USER_DEFINED_COLOURS);
}
}
public static String getVersionDetailsForConsole()
{
StringBuilder sb = new StringBuilder();
- sb.append("Jalview Version: " + jalview.bin.Cache.getDefault("VERSION", "TEST"));
+ sb.append("Jalview Version: "
+ + jalview.bin.Cache.getDefault("VERSION", "TEST"));
sb.append("\n");
sb.append("Jalview Installation: "
+ jalview.bin.Cache.getDefault("INSTALLATION", "unknown"));
sb.append("\n");
- sb.append("Build Date: " + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"));
+ sb.append("Build Date: "
+ + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"));
sb.append("\n");
sb.append("Java version: " + System.getProperty("java.version"));
sb.append("\n");
- sb.append(System.getProperty("os.arch") + " " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
+ sb.append(System.getProperty("os.arch") + " "
+ + System.getProperty("os.name") + " "
+ + System.getProperty("os.version"));
sb.append("\n");
appendIfNotNull(sb, "Install4j version: ",
System.getProperty("sys.install4jVersion"), "\n", null);
System.getProperty("installer_template_version"), "\n", null);
appendIfNotNull(sb, "Launcher version: ",
System.getProperty("launcher_version"), "\n", null);
- if (jalview.bin.Cache.getDefault("VERSION", "TEST").equals("DEVELOPMENT")) {
+ if (jalview.bin.Cache.getDefault("VERSION", "TEST")
+ .equals("DEVELOPMENT"))
+ {
appendIfNotNull(sb, "Getdown appdir: ",
System.getProperty("getdownappdir"), "\n", null);
appendIfNotNull(sb, "Java home: ", System.getProperty("java.home"),
// eg 'built from Source' or update channel
return jalview.bin.Cache.getDefault("INSTALLATION", "unknown");
}
-
+
/**
*
- * For AppletParams and Preferences ok_actionPerformed and startupFileTextfield_mouseClicked
+ * For AppletParams and Preferences ok_actionPerformed and
+ * startupFileTextfield_mouseClicked
*
* Sets a property value for the running application, without saving it to the
* properties file
*/
public static void setPropertyNoSave(String key, String obj)
{
- /* for JalviewJS should be
-
- getInstance().
-
- */
- setPropertyImpl(key, obj, false);
+ getInstance().setPropertyImpl(key, obj, false);
}
/**
* @param andSave
* @return
*/
- private /* for JalviewJS should not be static */ static Object setPropertyImpl(String key, String obj, boolean andSave)
+ private Object setPropertyImpl(
+ String key, String obj, boolean andSave)
{
Object oldValue = null;
try
return oldValue;
}
-
-
}
}
// report Jalview version
- Cache.loadBuildProperties(true);
+ Cache.getInstance().loadBuildProperties(true);
ArgsParser aparser = new ArgsParser(args);
headless = false;
protColour.getSelectedItem().toString());
Cache.setPropertyNoSave(DEFAULT_COLOUR_NUC,
nucColour.getSelectedItem().toString());
- Cache.setColourProperty("ANNOTATIONCOLOUR_MIN",
+ Cache.setColourPropertyNoSave("ANNOTATIONCOLOUR_MIN",
minColour.getBackground());
- Cache.setColourProperty("ANNOTATIONCOLOUR_MAX",
+ Cache.setColourPropertyNoSave("ANNOTATIONCOLOUR_MAX",
maxColour.getBackground());
/*
* Save Overview settings
*/
- Cache.setColourProperty(GAP_COLOUR, gapColour.getBackground());
- Cache.setColourProperty(HIDDEN_COLOUR, hiddenColour.getBackground());
+ Cache.setColourPropertyNoSave(GAP_COLOUR, gapColour.getBackground());
+ Cache.setColourPropertyNoSave(HIDDEN_COLOUR, hiddenColour.getBackground());
Cache.setPropertyNoSave(USE_LEGACY_GAP,
Boolean.toString(useLegacyGap.isSelected()));
Cache.setPropertyNoSave(SHOW_OV_HIDDEN_AT_START,