Merge branch 'develop' of https://source.jalview.org/git/jalview into develop
[jalview.git] / src / jalview / gui / PCAPanel.java
index 0a23517..6c76c3e 100644 (file)
@@ -131,8 +131,6 @@ public class PCAPanel extends GPCAPanel
 
     addKeyListener(getRotatableCanvas());
     validate();
-
-    this.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
   }
 
   /**
@@ -142,6 +140,12 @@ public class PCAPanel extends GPCAPanel
   protected void close_actionPerformed()
   {
     setPcaModel(null);
+    if (this.rc != null)
+    {
+      this.rc.sequencePoints = null;
+      this.rc.setAxisEndPoints(null);
+      this.rc = null;
+    }
   }
 
   @Override
@@ -206,6 +210,7 @@ public class PCAPanel extends GPCAPanel
               MessageManager.formatMessage("label.calc_title", "PCA",
                       getPcaModel().getScoreModelName()),
               475, 450);
+      this.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
     }
     working = false;
   }
@@ -573,11 +578,11 @@ public class PCAPanel extends GPCAPanel
     // }
     //
     // JPanel progressPanel;
-    // Long lId = new Long(id);
+    // Long lId = Long.valueOf(id);
     // GridLayout layout = (GridLayout) statusPanel.getLayout();
     // if (progressBars.get(lId) != null)
     // {
-    // progressPanel = (JPanel) progressBars.get(new Long(id));
+    // progressPanel = (JPanel) progressBars.get(Long.valueOf(id));
     // statusPanel.remove(progressPanel);
     // progressBars.remove(lId);
     // progressPanel = null;
@@ -616,13 +621,13 @@ public class PCAPanel extends GPCAPanel
           final IProgressIndicatorHandler handler)
   {
     progressBar.registerHandler(id, handler);
-    // if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
+    // if (progressBarHandlers == null || !progressBars.contains(Long.valueOf(id)))
     // {
     // throw new
     // Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
     // }
-    // progressBarHandlers.put(new Long(id), handler);
-    // final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
+    // progressBarHandlers.put(Long.valueOf(id), handler);
+    // final JPanel progressPanel = (JPanel) progressBars.get(Long.valueOf(id));
     // if (handler.canCancel())
     // {
     // JButton cancel = new JButton(