From: Jim Procter Date: Wed, 7 Aug 2024 14:11:03 +0000 (+0100) Subject: JAL-4159 JAL-789 report pasimap and pairwise alignment parameters in window title X-Git-Tag: Release_2_11_4_0~14^2~6^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=11cfa06b3572d711c3441c965e6340abcf20a4a2;p=jalview.git JAL-4159 JAL-789 report pasimap and pairwise alignment parameters in window title --- 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; } /**