JAL-2490 tidy code and tests for feature export in Jalview format
[jalview.git] / src / jalview / gui / PCAPanel.java
index 0675cdf..d8e6b06 100644 (file)
@@ -27,7 +27,7 @@ import jalview.api.analysis.SimilarityParamsI;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
-import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SequenceI;
 import jalview.jbgui.GPCAPanel;
 import jalview.util.MessageManager;
@@ -36,6 +36,7 @@ import jalview.viewmodel.PCAModel;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
+import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -72,6 +73,10 @@ public class PCAPanel extends GPCAPanel implements Runnable,
 
   PCAModel pcaModel;
 
+  private static final int MIN_WIDTH = 470;
+
+  private static final int MIN_HEIGHT = 250;
+
   int top = 0;
 
   /**
@@ -256,6 +261,7 @@ public class PCAPanel extends GPCAPanel implements Runnable,
       addKeyListener(rc);
       Desktop.addInternalFrame(this, MessageManager
               .getString("label.principal_component_analysis"), 475, 450);
+      this.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
     }
   }
 
@@ -400,7 +406,7 @@ public class PCAPanel extends GPCAPanel implements Runnable,
     }
     ;
     Object[] alAndColsel = pcaModel.getSeqtrings()
-            .getAlignmentAndColumnSelection(gc);
+            .getAlignmentAndHiddenColumns(gc);
 
     if (alAndColsel != null && alAndColsel[0] != null)
     {
@@ -417,8 +423,8 @@ public class PCAPanel extends GPCAPanel implements Runnable,
       if (true)
       {
         // make a new frame!
-        AlignFrame af = new AlignFrame(al,
-                (ColumnSelection) alAndColsel[1], AlignFrame.DEFAULT_WIDTH,
+        AlignFrame af = new AlignFrame(al, (HiddenColumns) alAndColsel[1],
+                AlignFrame.DEFAULT_WIDTH,
                 AlignFrame.DEFAULT_HEIGHT);
 
         // >>>This is a fix for the moment, until a better solution is