From: hansonr Date: Sun, 6 Oct 2019 10:44:23 +0000 (+0200) Subject: JAL-3451 setting dimensions for AlignFrame if embedded X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d5acde3c12dac7b95d5623c024054bb4bc9cce1d;p=jalview.git JAL-3451 setting dimensions for AlignFrame if embedded --- 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