JAL-1620 version bump and release notes
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index d610931..e1b5abb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
@@ -1139,14 +1139,17 @@ public class AlignmentPanel extends GAlignmentPanel implements
     return idwidth.intValue() + 4;
   }
 
-  void makeAlignmentImage(int type, File file)
+  void makeAlignmentImage(jalview.util.ImageMaker.TYPE type, File file)
   {
     long progress = System.currentTimeMillis();
     boolean headless = (System.getProperty("java.awt.headless") != null && System
             .getProperty("java.awt.headless").equals("true"));
     if (alignFrame != null && !headless)
     {
-      alignFrame.setProgressBar(MessageManager.formatMessage("status.saving_file", new String[]{(type == jalview.util.ImageMaker.PNG ? MessageManager.getString("label.png_image") : MessageManager.getString("label.eps_file"))}), progress);
+      alignFrame.setProgressBar(MessageManager.formatMessage(
+              "status.saving_file",
+              new String[]
+              { type.getLabel() }), progress);
     }
     try
     {
@@ -1190,16 +1193,22 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
         jalview.util.ImageMaker im;
         final String imageAction, imageTitle;
-        if (type == jalview.util.ImageMaker.PNG)
+        if (type == jalview.util.ImageMaker.TYPE.PNG)
         {
           imageAction = "Create PNG image from alignment";
           imageTitle = null;
         }
-        else
+        else if (type == jalview.util.ImageMaker.TYPE.EPS)
         {
           imageAction = "Create EPS file from alignment";
           imageTitle = alignFrame.getTitle();
         }
+        else
+        {
+          imageAction = "Create SVG file from alignment";
+          imageTitle = alignFrame.getTitle();
+        }
+
         im = new jalview.util.ImageMaker(this, type, imageAction, width,
                 height, file, imageTitle);
         if (av.getWrapAlignment())
@@ -1243,7 +1252,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   public void makeEPS(File epsFile)
   {
-    makeAlignmentImage(jalview.util.ImageMaker.EPS, epsFile);
+    makeAlignmentImage(jalview.util.ImageMaker.TYPE.EPS, epsFile);
   }
 
   /**
@@ -1251,9 +1260,13 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   public void makePNG(File pngFile)
   {
-    makeAlignmentImage(jalview.util.ImageMaker.PNG, pngFile);
+    makeAlignmentImage(jalview.util.ImageMaker.TYPE.PNG, pngFile);
   }
 
+  public void makeSVG(File svgFile)
+  {
+    makeAlignmentImage(jalview.util.ImageMaker.TYPE.SVG, svgFile);
+  }
   public void makePNGImageMap(File imgMapFile, String imageName)
   {
     // /////ONLY WORKS WITH NONE WRAPPED ALIGNMENTS
@@ -1490,11 +1503,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
     return av.getAlignment();
   }
 
-  /**
-   * get the name for this view
-   * 
-   * @return
-   */
+
+  @Override
   public String getViewName()
   {
     return av.viewName;