X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FPreferences.java;h=663390db8e06671a9ca5445ef70a37dd9930a1fd;hb=b5889c572976c81f068d9743363695ca84e7d413;hp=ab09f74086e8d64666693ab15f54d78104bbdd1e;hpb=71cf7645b3b66be24a155fd39a0f0e98c9ec1430;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index ab09f74..663390d 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -40,6 +40,7 @@ import jalview.urls.desktop.DesktopUrlProviderFactory; import jalview.util.MessageManager; import jalview.util.Platform; import jalview.util.UrlConstants; +import jalview.viewmodel.AlignmentViewport.AutoAnnotation; import jalview.ws.sifts.SiftsSettings; import java.awt.BorderLayout; @@ -108,8 +109,6 @@ public class Preferences extends GPreferences public static final String SHOW_AUTOCALC_ABOVE = "SHOW_AUTOCALC_ABOVE"; - public static final String SHOW_OCCUPANCY = "SHOW_OCCUPANCY"; - public static final String SHOW_OV_HIDDEN_AT_START = "SHOW_OV_HIDDEN_AT_START"; public static final String USE_LEGACY_GAP = "USE_LEGACY_GAP"; @@ -211,13 +210,17 @@ public class Preferences extends GPreferences fullScreen.setSelected(Cache.getDefault("SHOW_FULLSCREEN", false)); annotations.setSelected(Cache.getDefault("SHOW_ANNOTATIONS", true)); - conservation.setSelected(Cache.getDefault("SHOW_CONSERVATION", true)); - quality.setSelected(Cache.getDefault("SHOW_QUALITY", true)); - identity.setSelected(Cache.getDefault("SHOW_IDENTITY", true)); + conservation.setSelected(Cache + .getDefault(AutoAnnotation.CONSERVATION.preferenceKey, true)); + quality.setSelected( + Cache.getDefault(AutoAnnotation.QUALITY.preferenceKey, true)); + identity.setSelected( + Cache.getDefault(AutoAnnotation.CONSENSUS.preferenceKey, true)); openoverv.setSelected(Cache.getDefault("SHOW_OVERVIEW", false)); showUnconserved .setSelected(Cache.getDefault("SHOW_UNCONSERVED", false)); - showOccupancy.setSelected(Cache.getDefault(SHOW_OCCUPANCY, false)); + showOccupancy.setSelected(Cache + .getDefault(AutoAnnotation.OCCUPANCY.preferenceKey, false)); showGroupConsensus .setSelected(Cache.getDefault("SHOW_GROUP_CONSENSUS", false)); showGroupConservation.setSelected( @@ -582,12 +585,18 @@ public class Preferences extends GPreferences Boolean.toString(openoverv.isSelected())); Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", Boolean.toString(annotations.isSelected())); - Cache.applicationProperties.setProperty("SHOW_CONSERVATION", + Cache.applicationProperties.setProperty( + AutoAnnotation.CONSERVATION.preferenceKey, Boolean.toString(conservation.isSelected())); - Cache.applicationProperties.setProperty("SHOW_QUALITY", + Cache.applicationProperties.setProperty( + AutoAnnotation.QUALITY.preferenceKey, Boolean.toString(quality.isSelected())); - Cache.applicationProperties.setProperty("SHOW_IDENTITY", + Cache.applicationProperties.setProperty( + AutoAnnotation.CONSENSUS.preferenceKey, Boolean.toString(identity.isSelected())); + Cache.applicationProperties.setProperty( + AutoAnnotation.OCCUPANCY.preferenceKey, + Boolean.toString(showOccupancy.isSelected())); Cache.applicationProperties.setProperty("GAP_SYMBOL", gapSymbolCB.getSelectedItem().toString()); @@ -603,8 +612,6 @@ public class Preferences extends GPreferences Boolean.toString(idItalics.isSelected())); Cache.applicationProperties.setProperty("SHOW_UNCONSERVED", Boolean.toString(showUnconserved.isSelected())); - Cache.applicationProperties.setProperty(SHOW_OCCUPANCY, - Boolean.toString(showOccupancy.isSelected())); Cache.applicationProperties.setProperty("SHOW_GROUP_CONSENSUS", Boolean.toString(showGroupConsensus.isSelected())); Cache.applicationProperties.setProperty("SHOW_GROUP_CONSERVATION",