JAL-4059 Revert libjs/MiGLayout as new miglayout transpile of 4.0 includes reference...
[jalview.git] / src / jalview / gui / PCAPanel.java
index 211c370..44a65ba 100644 (file)
@@ -52,6 +52,8 @@ import jalview.gui.JalviewColourChooser.ColourChooserListener;
 import jalview.io.exceptions.ImageOutputException;
 import jalview.jbgui.GPCAPanel;
 import jalview.math.RotatableMatrix.Axis;
+import jalview.util.IdUtils;
+import jalview.util.IdUtils.IdType;
 import jalview.util.ImageMaker;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
@@ -174,7 +176,7 @@ public class PCAPanel extends GPCAPanel
   public void run()
   {
     working = true;
-    long progId = System.currentTimeMillis();
+    long progId = IdUtils.newId(IdType.PROGRESS);
     IProgressIndicator progress = this;
     String message = MessageManager.getString("label.pca_recalculating");
     if (getParent() == null)
@@ -419,6 +421,7 @@ public class PCAPanel extends GPCAPanel
     }
   }
 
+  @Override
   public void makePCAImage(ImageMaker.TYPE type)
   {
     int width = getRotatableCanvas().getWidth();
@@ -439,10 +442,13 @@ public class PCAPanel extends GPCAPanel
     };
     String pca = MessageManager.getString("label.pca");
     ImageExporter exporter = new ImageExporter(writer, null, type, pca);
-    try {
+    try
+    {
       exporter.doExport(null, this, width, height, pca);
-    } catch (ImageOutputException ioex) {
-      Console.error("Unexpected error whilst writing "+type.toString(),ioex);
+    } catch (ImageOutputException ioex)
+    {
+      Console.error("Unexpected error whilst writing " + type.toString(),
+              ioex);
     }
   }