From 11cfa06b3572d711c3441c965e6340abcf20a4a2 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 7 Aug 2024 15:11:03 +0100 Subject: [PATCH] JAL-4159 JAL-789 report pasimap and pairwise alignment parameters in window title --- src/jalview/gui/AlignFrame.java | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index f61c073..7f6646f 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3962,18 +3962,36 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } tp = new TreePanel(alignPanel, type, modelName, options); - frameTitle = tp.getPanelTitle() + (onSelection ? " on region" : ""); + + frameTitle = formCalculationTitle(tp.getPanelTitle(),onSelection, viewport.getViewName(),this.title); + + Desktop.addInternalFrame(tp, frameTitle, 600, 500); + } + + /** + * + * @param panelTitle - calculation name + * @param onSelection - true if a selection was analysed + * @param viewName - null or current view name + * @param title - alignment frame title + * @return (?on region) from (?viewName of) alignment name + */ + private String formCalculationTitle(String panelTitle, + boolean onSelection, String viewName, String title) + { + String frameTitle = panelTitle; + + frameTitle += (onSelection ? " on region" : ""); frameTitle += " from "; - if (viewport.getViewName() != null) + if (viewName!=null) { frameTitle += viewport.getViewName() + " of "; } - frameTitle += this.title; - - Desktop.addInternalFrame(tp, frameTitle, 600, 500); + frameTitle += title; + return frameTitle; } /** -- 1.7.10.2