From a91518f29f584c4e8276ca36b4aeede71803cf7c Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 31 Mar 2015 16:06:20 +0100 Subject: [PATCH] JAL-1264 reinstated 'show annotations' menu item (and set from params) --- src/jalview/appletgui/AlignFrame.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 3e919f6..93bd155 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -113,9 +113,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, public AlignViewport viewport; - int DEFAULT_WIDTH = 700; + // width and height may be overridden by applet parameters + int frameWidth = 700; - int DEFAULT_HEIGHT = 500; + int frameHeight = 500; String jalviewServletURL; @@ -176,13 +177,13 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, if (param != null) { int width = Integer.parseInt(param); - DEFAULT_WIDTH = width; + frameWidth = width; } param = applet.getParameter("windowHeight"); if (param != null) { int height = Integer.parseInt(param); - DEFAULT_HEIGHT = height; + frameHeight = height; } } catch (Exception ex) { @@ -203,6 +204,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, showSequenceLogo.setState(viewport.isShowSequenceLogo()); normSequenceLogo.setState(viewport.isNormaliseSequenceLogo()); applyToAllGroups.setState(viewport.getColourAppliesToAllGroups()); + annotationPanelMenuItem.setState(viewport.isShowAnnotation()); showAlignmentAnnotations.setState(viewport.isShowAnnotation()); showSequenceAnnotations.setState(viewport.isShowAnnotation()); @@ -1964,8 +1966,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } } - jalview.bin.JalviewLite.addFrame(af, newtitle, DEFAULT_WIDTH, - DEFAULT_HEIGHT); + jalview.bin.JalviewLite.addFrame(af, newtitle, frameWidth, + frameHeight); } else { @@ -3596,8 +3598,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, /* * Annotations menu */ - // annotationsMenu.add(annotationPanelMenuItem); - // annotationsMenu.addSeparator(); + annotationsMenu.add(annotationPanelMenuItem); + annotationsMenu.addSeparator(); annotationsMenu.add(showAlignmentAnnotations); annotationsMenu.add(showSequenceAnnotations); annotationsMenu.add(sortAnnBySequence); @@ -3771,8 +3773,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, add(alignPanel, BorderLayout.CENTER); // and register with the applet so it can pass external API calls to us jalview.bin.JalviewLite.addFrame(this, this.getTitle(), - DEFAULT_WIDTH, - DEFAULT_HEIGHT); + frameWidth, + frameHeight); } } -- 1.7.10.2