From d5acde3c12dac7b95d5623c024054bb4bc9cce1d Mon Sep 17 00:00:00 2001 From: hansonr Date: Sun, 6 Oct 2019 12:44:23 +0200 Subject: [PATCH] JAL-3451 setting dimensions for AlignFrame if embedded --- src/jalview/io/FileLoader.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 3585c93..1fa6957 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -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 -- 1.7.10.2