From: Jim Procter Date: Fri, 4 Apr 2014 15:18:24 +0000 (+0100) Subject: JAL-1211 - pick up site-defined defined window geometry before we calculate layout X-Git-Tag: Jalview_2_9~199^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=09e6d03712de83321f315298d41590ccd48512aa;p=jalview.git JAL-1211 - pick up site-defined defined window geometry before we calculate layout --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 638a68f..51df8b9 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -122,7 +122,28 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { ex.printStackTrace(); } - + // need to get window geometry before we calculate alignment layout + if (applet != null) + { + String param; + try + { + param = applet.getParameter("windowWidth"); + if (param != null) + { + int width = Integer.parseInt(param); + DEFAULT_WIDTH = width; + } + param = applet.getParameter("windowHeight"); + if (param != null) + { + int height = Integer.parseInt(param); + DEFAULT_HEIGHT = height; + } + } catch (Exception ex) + { + } + } viewport = new AlignViewport(al, applet); alignPanel = new AlignmentPanel(this, viewport); avc = new jalview.controller.AlignViewController(this, viewport, alignPanel); @@ -174,23 +195,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, centreColumnLabelFlag.setState(true); centreColumnLabelFlag_stateChanged(); } - try - { - param = applet.getParameter("windowWidth"); - if (param != null) - { - int width = Integer.parseInt(param); - DEFAULT_WIDTH = width; - } - param = applet.getParameter("windowHeight"); - if (param != null) - { - int height = Integer.parseInt(param); - DEFAULT_HEIGHT = height; - } - } catch (Exception ex) - { - } } if (viewport.getAlignment().isNucleotide())