JAL-3451 setting dimensions for AlignFrame if embedded
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 6 Oct 2019 10:44:23 +0000 (12:44 +0200)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 6 Oct 2019 10:44:23 +0000 (12:44 +0200)
src/jalview/io/FileLoader.java

index 3585c93..1fa6957 100755 (executable)
@@ -41,6 +41,7 @@ import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.ws.utils.UrlDownloadClient;
 
+import java.awt.Dimension;
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
 import java.io.File;
@@ -495,8 +496,13 @@ public class FileLoader implements Runnable
               // status in Jalview 3
               // TODO: define 'virtual desktop' for benefit of headless scripts
               // that perform queries to find the 'current working alignment'
-              Desktop.addInternalFrame(alignFrame, title,
+              
+              
+              Dimension dim = Platform.getDimIfEmbedded(alignFrame,
                       AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
+              alignFrame.setSize(dim);
+              Desktop.addInternalFrame(alignFrame, title, dim.width,
+                      dim.height);
             }
 
             try