Autocalculate consensus set in preferences
authoramwaterhouse <Andrew Waterhouse>
Fri, 7 Apr 2006 11:27:55 +0000 (11:27 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 7 Apr 2006 11:27:55 +0000 (11:27 +0000)
src/jalview/gui/AlignViewport.java
src/jalview/gui/Preferences.java
src/jalview/jbgui/GAlignFrame.java
src/jalview/jbgui/GPreferences.java

index 2c8172b..15c10e7 100755 (executable)
@@ -136,6 +136,8 @@ public class AlignViewport
       showQuality = Cache.getDefault("SHOW_QUALITY", true);\r
       showIdentity = Cache.getDefault("SHOW_IDENTITY", true);\r
 \r
+      autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);\r
+\r
        String fontName = Cache.getDefault("FONT_NAME", "SansSerif");\r
        String fontStyle = Cache.getDefault("FONT_STYLE", Font.PLAIN + "") ;\r
        String fontSize = Cache.getDefault("FONT_SIZE", "10");\r
index f322daa..8cbe03f 100755 (executable)
@@ -150,6 +150,8 @@ public class Preferences extends GPreferences
         pileupjv.setSelected( Cache.getDefault("PILEUP_JVSUFFIX", true) );\r
         pirjv.setSelected( Cache.getDefault("PIR_JVSUFFIX", true) );\r
 \r
+        autoCalculateConsCheck.setSelected( Cache.getDefault("AUTO_CALC_CONSENSUS", true));\r
+\r
   /****************************************************\r
    * Set up Connections\r
    */\r
@@ -277,6 +279,8 @@ public class Preferences extends GPreferences
         Cache.applicationProperties.setProperty("PILEUP_JVSUFFIX", Boolean.toString(pileupjv.isSelected()) );\r
         Cache.applicationProperties.setProperty("PIR_JVSUFFIX", Boolean.toString(pirjv.isSelected()) );\r
 \r
+        Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",\r
+                                                Boolean.toString(autoCalculateConsCheck.isSelected()));\r
 \r
         Cache.saveProperties();\r
         try\r
index 1cbe15c..422f9a7 100755 (executable)
@@ -979,7 +979,7 @@ public class GAlignFrame
       }\r
     });\r
     autoCalculate.setText("Autocalculate Consensus");\r
-    autoCalculate.setState(true);\r
+    autoCalculate.setState( jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));\r
     autoCalculate.addActionListener(new ActionListener()\r
     {\r
       public void actionPerformed(ActionEvent e)\r
index 8b10c5f..58c7743 100755 (executable)
@@ -104,6 +104,8 @@ public class GPreferences extends JPanel
   protected JCheckBox seqLimit = new JCheckBox();\r
   GridLayout gridLayout3 = new GridLayout();\r
   protected JCheckBox smoothFont = new JCheckBox();\r
+  JPanel calcTab = new JPanel();\r
+  protected JCheckBox autoCalculateConsCheck = new JCheckBox();\r
   /**\r
      * Creates a new GPreferences object.\r
      */\r
@@ -357,6 +359,9 @@ public class GPreferences extends JPanel
     smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);\r
     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);\r
     smoothFont.setText("Smooth Font");\r
+    calcTab.setLayout(null);\r
+    autoCalculateConsCheck.setText("AutoCalculate Consensus");\r
+    autoCalculateConsCheck.setBounds(new Rectangle(16, 29, 209, 23));\r
     jPanel2.add(fullScreen);\r
 \r
     jPanel2.add(annotations);\r
@@ -439,6 +444,8 @@ public class GPreferences extends JPanel
     jPanel11.add(pfamjv);\r
     jPanel11.add(pileupjv);\r
     jPanel11.add(pirjv);\r
+    tabbedPane.add(calcTab, "Calculations");\r
+    calcTab.add(autoCalculateConsCheck);\r
 \r
     exportTab.add(epsLabel);\r
     exportTab.add(epsRendering);\r