Sequence colour in viewport
[jalview.git] / src / jalview / gui / Preferences.java
index 9ac8acf..4774cac 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,8 +78,18 @@ 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
         fullScreen.setSelected(  Cache.getDefault("SHOW_FULLSCREEN", false));\r
@@ -123,6 +135,8 @@ public class Preferences extends GPreferences
 \r
         smoothFont.setSelected(Cache.getDefault("ANTI_ALIAS", false));\r
 \r
+        wrap.setSelected(Cache.getDefault("WRAP_ALIGNMENT", false));\r
+\r
         gapSymbolCB.addItem("-");\r
         gapSymbolCB.addItem(".");\r
 \r
@@ -213,6 +227,8 @@ public class Preferences extends GPreferences
 \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
@@ -288,6 +304,9 @@ public class Preferences extends GPreferences
                                                 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
         {\r