X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignFrame.java;h=ad1626cbb4c428f8fa3843fa6ef62491f746e2cb;hb=refs%2Fheads%2Ffeatures%2FJAL-1740_BioJsAutoUpdater;hp=3e919f65c0e2b471d0e3faa4460b0cc099b9090a;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 3e919f6..ad1626c 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -103,6 +103,7 @@ import jalview.structure.StructureSelectionManager; import jalview.structures.models.AAStructureBindingModel; import jalview.util.MappingUtils; import jalview.util.MessageManager; +import jalview.viewmodel.AlignmentViewport; public class AlignFrame extends EmbmenuFrame implements ActionListener, ItemListener, KeyListener, AlignViewControllerGuiI @@ -113,9 +114,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 +178,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) { @@ -196,13 +198,14 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.updateConsensus(alignPanel); displayNonconservedMenuItem.setState(viewport.getShowUnconserved()); - followMouseOverFlag.setState(viewport.getFollowHighlight()); + followMouseOverFlag.setState(viewport.isFollowHighlight()); showGroupConsensus.setState(viewport.isShowGroupConsensus()); showGroupConservation.setState(viewport.isShowGroupConservation()); showConsensusHistogram.setState(viewport.isShowConsensusHistogram()); showSequenceLogo.setState(viewport.isShowSequenceLogo()); normSequenceLogo.setState(viewport.isNormaliseSequenceLogo()); applyToAllGroups.setState(viewport.getColourAppliesToAllGroups()); + annotationPanelMenuItem.setState(viewport.isShowAnnotation()); showAlignmentAnnotations.setState(viewport.isShowAnnotation()); showSequenceAnnotations.setState(viewport.isShowAnnotation()); @@ -924,7 +927,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, private void mouseOverFlag_stateChanged() { - viewport.followHighlight = followMouseOverFlag.getState(); + viewport.setFollowHighlight(followMouseOverFlag.getState()); // TODO: could kick the scrollTo mechanism to reset view for current // searchresults. } @@ -1592,7 +1595,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.addToRedoList(command); command.undoCommand(null); - AlignViewport originalSource = getOriginatingSource(command); + AlignmentViewport originalSource = getOriginatingSource(command); // JBPNote Test if (originalSource != viewport) { @@ -1624,7 +1627,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.addToHistoryList(command); command.doCommand(null); - AlignViewport originalSource = getOriginatingSource(command); + AlignmentViewport originalSource = getOriginatingSource(command); // JBPNote Test if (originalSource != viewport) { @@ -1640,9 +1643,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, .getAlignment().getSequences()); } - AlignViewport getOriginatingSource(CommandI command) + AlignmentViewport getOriginatingSource(CommandI command) { - AlignViewport originalSource = null; + AlignmentViewport originalSource = null; // For sequence removal and addition, we need to fire // the property change event FROM the viewport where the // original alignment was altered @@ -1964,8 +1967,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 +3599,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); @@ -3738,6 +3741,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, private CheckboxMenuItem showAutoLast; + private SplitFrame splitFrame; + /** * Attach the alignFrame panels after embedding menus, if necessary. This used * to be called setEmbedded, but is now creates the dropdown menus in a @@ -3771,8 +3776,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); } } @@ -4164,4 +4169,13 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, return false; } + public SplitFrame getSplitFrame() + { + return this.splitFrame; + } + + public void setSplitFrame(SplitFrame sf) + { + this.splitFrame = sf; + } }