DEFAULT_FILE_FORMAT added
authoramwaterhouse <Andrew Waterhouse>
Fri, 20 May 2005 14:57:29 +0000 (14:57 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 20 May 2005 14:57:29 +0000 (14:57 +0000)
src/jalview/gui/Desktop.java
src/jalview/gui/Preferences.java
src/jalview/gui/SliderPanel.java

index 32297e1..36183bb 100755 (executable)
@@ -182,7 +182,7 @@ this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this));
    JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"),\r
        new String[]{"fa, fasta, fastq", "aln",  "pfam", "msf", "pir","blc","jar"},\r
        new String[]{"Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview"}\r
-       ,null);\r
+       ,jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));\r
 \r
    chooser.setFileView(new JalviewFileView());\r
    chooser.setDialogTitle("Open local file");\r
@@ -190,6 +190,7 @@ this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this));
    int value = chooser.showOpenDialog(this);\r
    if(value == JalviewFileChooser.APPROVE_OPTION)\r
    {\r
+     jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", chooser.getSelectedFormat());\r
      String choice =  chooser.getSelectedFile().getPath();\r
      jalview.bin.Cache.setProperty("LAST_DIRECTORY", chooser.getSelectedFile().getParent());\r
      if(chooser.getSelectedFormat().equals("Jalview"))\r
index 1553de5..c11e545 100755 (executable)
@@ -188,12 +188,13 @@ public class Preferences extends GPreferences
     JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"),\r
         new String[]{"fa, fasta, fastq", "aln",  "pfam", "msf", "pir","blc","jar"},\r
         new String[]{"Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview"}\r
-       ,null);\r
+       ,jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));\r
    chooser.setFileView(new JalviewFileView());\r
    chooser.setDialogTitle("Select startup file");\r
    int value = chooser.showOpenDialog(this);\r
    if(value == JalviewFileChooser.APPROVE_OPTION)\r
    {\r
+     jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", chooser.getSelectedFormat());\r
      startupFileTextfield.setText( chooser.getSelectedFile().getAbsolutePath() );\r
    }\r
   }\r
index 6d4b975..eba89e8 100755 (executable)
@@ -201,7 +201,7 @@ public class SliderPanel extends GSliderPanel
       groupIndex--;\r
     }\r
 \r
-    ap.seqPanel.repaint();\r
+    ap.seqPanel.seqCanvas.repaint();\r
 \r
   }\r
 \r