Use Cache.getProperty
authoramwaterhouse <Andrew Waterhouse>
Mon, 7 Feb 2005 17:09:19 +0000 (17:09 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 7 Feb 2005 17:09:19 +0000 (17:09 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/Desktop.java
src/jalview/gui/TreePanel.java
src/jalview/gui/UserDefinedColours.java
src/jalview/io/HTMLOutput.java

index 1f6fabd..3211b03 100755 (executable)
@@ -32,26 +32,25 @@ public class AlignFrame extends GAlignFrame
   public AlignFrame(AlignmentI al)\r
   {\r
     super();\r
-\r
-    AlignmentUtil.addUniprotFeatures(al);\r
-\r
     viewport = new AlignViewport(al,true,true,true,false);\r
     alignPanel = new AlignmentPanel(this, viewport);\r
     getContentPane().add(alignPanel, java.awt.BorderLayout.CENTER);\r
     fontNameMenuItem.setText(viewport.getFont().getName());\r
     fontSizeMenuItem.setText(viewport.getFont().getSize()+"");\r
+\r
+    AlignmentUtil.fetchSequenceFeatures(al, alignPanel);\r
   }\r
 \r
   protected void saveAs_actionPerformed(ActionEvent e)\r
   {\r
-    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
+    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
     chooser.setDialogTitle("Save Alignment to file - "+e.getActionCommand() +" format.");\r
     chooser.setToolTipText("Save");\r
     int value = chooser.showSaveDialog(this);\r
     if(value == JFileChooser.APPROVE_OPTION)\r
     {\r
       String choice =  chooser.getSelectedFile().getPath();\r
-      jalview.bin.Cache.LAST_DIRECTORY = choice;\r
+      jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);\r
       String output = FormatAdapter.get(e.getActionCommand(), viewport.getAlignment().getSequences());\r
       try{\r
         java.io.PrintWriter out = new java.io.PrintWriter( new java.io.FileWriter( choice )  );\r
index 2c475fa..b47ca4b 100755 (executable)
@@ -125,14 +125,14 @@ public class Desktop extends jalview.jbgui.GDesktop
 \r
  public void inputLocalFileMenuItem_actionPerformed(ActionEvent e)\r
  {\r
-   JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
+   JFileChooser chooser = new JFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
    chooser.setDialogTitle("Open local file");\r
    chooser.setToolTipText("Open");\r
    int value = chooser.showOpenDialog(this);\r
    if(value == JFileChooser.APPROVE_OPTION)\r
    {\r
      String choice =  chooser.getSelectedFile().getPath();\r
-     jalview.bin.Cache.LAST_DIRECTORY = choice;\r
+     jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);\r
      String format = IdentifyFile.Identify(choice, "File");\r
      LoadFile(choice, "File", format);\r
    }\r
index 9e9e70b..936eebe 100755 (executable)
@@ -231,14 +231,14 @@ public void propertiesInit() {
   {\r
 \r
     try{\r
-      JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
+      JFileChooser chooser = new JFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
       chooser.setDialogTitle("Save Tree as postscript file");\r
       chooser.setToolTipText("Save");\r
       int value = chooser.showSaveDialog(this);\r
       if (value == JFileChooser.APPROVE_OPTION)\r
       {\r
         String choice = chooser.getSelectedFile().getPath();\r
-        jalview.bin.Cache.LAST_DIRECTORY = choice;\r
+        jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);\r
 \r
         bw = new PrintWriter(new FileWriter(choice));\r
         getPostscript(bw);\r
index fd9f1bc..1a3fa86 100755 (executable)
@@ -111,14 +111,14 @@ public class UserDefinedColours extends GUserDefinedColours implements ChangeLis
 \r
   protected void loadbutton_actionPerformed(ActionEvent e)\r
   {\r
-    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
+    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
     chooser.setDialogTitle("Load colour scheme");\r
     chooser.setToolTipText("Load");\r
     int value = chooser.showOpenDialog(this);\r
     if (value == JFileChooser.APPROVE_OPTION)\r
     {\r
       String choice = chooser.getSelectedFile().getPath();\r
-      jalview.bin.Cache.LAST_DIRECTORY = choice;\r
+      jalview.bin.Cache.setProperty("LAST_DIRECTORY",  choice);\r
 \r
       try{\r
         BufferedReader in = new BufferedReader(new FileReader(choice));\r
@@ -138,14 +138,14 @@ public class UserDefinedColours extends GUserDefinedColours implements ChangeLis
 \r
   protected void savebutton_actionPerformed(ActionEvent e)\r
   {\r
-    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
+    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
     chooser.setDialogTitle("Save colour scheme");\r
     chooser.setToolTipText("Save");\r
     int value = chooser.showSaveDialog(this);\r
     if (value == JFileChooser.APPROVE_OPTION)\r
     {\r
       String choice = chooser.getSelectedFile().getPath();\r
-      jalview.bin.Cache.LAST_DIRECTORY = choice;\r
+      jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);\r
 \r
       try{\r
         PrintWriter out = new PrintWriter(new FileWriter(choice));\r
index b70ba68..d48c068 100755 (executable)
@@ -19,14 +19,14 @@ public class HTMLOutput
   {\r
     this.av = av;\r
     sr = new SequenceRenderer(av);\r
-    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
+    JFileChooser chooser = new JFileChooser(jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
     chooser.setDialogTitle("Save as HTML");\r
     chooser.setToolTipText("Save");\r
     int value = chooser.showSaveDialog(null);\r
     if(value == JFileChooser.APPROVE_OPTION)\r
     {\r
       String choice =  chooser.getSelectedFile().getPath();\r
-      jalview.bin.Cache.LAST_DIRECTORY = choice;\r
+      jalview.bin.Cache.setProperty("LAST_DIRECTORY",  choice);\r
       try{\r
         PrintWriter out = new java.io.PrintWriter(new java.io.FileWriter(choice));\r
         out.println("<HTML>");\r