ID_ITALICS option in preferences
[jalview.git] / src / jalview / gui / Preferences.java
index f322daa..b58c72d 100755 (executable)
@@ -1,6 +1,6 @@
 /*\r
  * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -47,7 +47,7 @@ public class Preferences extends GPreferences
     static\r
     {\r
       String string = Cache.getDefault("SEQUENCE_LINKS",\r
-                                       "SRS|http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+[uniprot-all:$SEQUENCE_ID$]+-vn+2");\r
+                                       "SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");\r
       sequenceURLLinks = new Vector();\r
 \r
       try\r
@@ -67,6 +67,8 @@ public class Preferences extends GPreferences
 \r
     JInternalFrame frame;\r
 \r
+    DasSourceBrowser dasSource;\r
+\r
 \r
     /**\r
      * Creates a new Preferences object.\r
@@ -76,10 +78,21 @@ public class Preferences extends GPreferences
 \r
         frame = new JInternalFrame();\r
         frame.setContentPane(this);\r
-        Desktop.addInternalFrame(frame, "Preferences", 480, 395);\r
-        frame.setMinimumSize(new Dimension(480,395));\r
+        dasSource = new DasSourceBrowser();\r
+        dasPanel.add(dasSource, BorderLayout.CENTER);\r
+\r
+        int width = 500, height = 420;\r
+        if(System.getProperty("os.name").startsWith("Mac"))\r
+        {\r
+          width = 570;\r
+          height = 460;\r
+        }\r
+\r
+        Desktop.addInternalFrame(frame, "Preferences", width, height);\r
+        frame.setMinimumSize(new Dimension(width, height));\r
 \r
         seqLimit.setSelected(    Cache.getDefault("SHOW_JVSUFFIX", true));\r
+        rightAlign.setSelected(  Cache.getDefault("RIGHT_ALIGN_IDS", false));\r
         fullScreen.setSelected(  Cache.getDefault("SHOW_FULLSCREEN", false));\r
         annotations.setSelected( Cache.getDefault("SHOW_ANNOTATIONS", true));\r
 \r
@@ -123,6 +136,10 @@ public class Preferences extends GPreferences
 \r
         smoothFont.setSelected(Cache.getDefault("ANTI_ALIAS", false));\r
 \r
+        idItalics.setSelected(Cache.getDefault("ID_ITALICS", true));\r
+\r
+        wrap.setSelected(Cache.getDefault("WRAP_ALIGNMENT", false));\r
+\r
         gapSymbolCB.addItem("-");\r
         gapSymbolCB.addItem(".");\r
 \r
@@ -150,6 +167,11 @@ public class Preferences extends GPreferences
         pileupjv.setSelected( Cache.getDefault("PILEUP_JVSUFFIX", true) );\r
         pirjv.setSelected( Cache.getDefault("PIR_JVSUFFIX", true) );\r
 \r
+        modellerOutput.setSelected( Cache.getDefault("PIR_MODELLER", false));\r
+\r
+        autoCalculateConsCheck.setSelected( Cache.getDefault("AUTO_CALC_CONSENSUS", true));\r
+        padGaps.setSelected( Cache.getDefault("PAD_GAPS", false));\r
+\r
   /****************************************************\r
    * Set up Connections\r
    */\r
@@ -192,6 +214,7 @@ public class Preferences extends GPreferences
     {\r
 \r
       Cache.applicationProperties.setProperty("SHOW_JVSUFFIX", Boolean.toString(seqLimit.isSelected()));\r
+      Cache.applicationProperties.setProperty("RIGHT_ALIGN_IDS", Boolean.toString(rightAlign.isSelected()));\r
       Cache.applicationProperties.setProperty("SHOW_FULLSCREEN", Boolean.toString(fullScreen.isSelected()));\r
 \r
       Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", Boolean.toString(annotations.isSelected()));\r
@@ -206,8 +229,12 @@ public class Preferences extends GPreferences
       Cache.applicationProperties.setProperty("FONT_STYLE", fontStyleCB.getSelectedItem().toString());\r
       Cache.applicationProperties.setProperty("FONT_SIZE", fontSizeCB.getSelectedItem().toString());\r
 \r
+      Cache.applicationProperties.setProperty("ID_ITALICS", Boolean.toString(idItalics.isSelected()));\r
+\r
       Cache.applicationProperties.setProperty("ANTI_ALIAS", Boolean.toString(smoothFont.isSelected()));\r
 \r
+      Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", Boolean.toString(wrap.isSelected()));\r
+\r
       Cache.applicationProperties.setProperty("STARTUP_FILE", startupFileTextfield.getText());\r
       Cache.applicationProperties.setProperty("SHOW_STARTUP_FILE",  Boolean.toString(startupCheckbox.isSelected()));\r
 \r
@@ -276,7 +303,15 @@ public class Preferences extends GPreferences
         Cache.applicationProperties.setProperty("PFAM_JVSUFFIX", Boolean.toString(pfamjv.isSelected()) );\r
         Cache.applicationProperties.setProperty("PILEUP_JVSUFFIX", Boolean.toString(pileupjv.isSelected()) );\r
         Cache.applicationProperties.setProperty("PIR_JVSUFFIX", Boolean.toString(pirjv.isSelected()) );\r
+        Cache.applicationProperties.setProperty("PIR_MODELLER", Boolean.toString(modellerOutput.isSelected()) );\r
+        jalview.io.PIRFile.useModellerOutput = modellerOutput.isSelected();\r
+\r
+        Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",\r
+                                                Boolean.toString(autoCalculateConsCheck.isSelected()));\r
+        Cache.applicationProperties.setProperty("PAD_GAPS",\r
+                                                Boolean.toString(padGaps.isSelected()));\r
 \r
+        dasSource.saveProperties(Cache.applicationProperties);\r
 \r
         Cache.saveProperties();\r
         try\r