From 66bafd3a951e3365d766726c1a59a2bbff15e8f1 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Tue, 5 Dec 2017 11:29:52 +0000 Subject: [PATCH] JAL-2805 JAL-2847 JAL-281 added file path to Aptx frame title --- resources/lang/Messages.properties | 2 ++ src/jalview/ext/archaeopteryx/AptxInit.java | 30 ++++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 67af027..eb823af 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -173,6 +173,8 @@ label.average_distance_identity = Average Distance Using % Identity label.neighbour_joining_identity = Neighbour Joining Using % Identity label.choose_calculation = Choose Calculation label.treecalc_title = {0} Using {1} +label.aptx_title = Archaeopteryx Tree View +label.aptx_title_append = of {0} label.tree_calc_av = Average Distance label.tree_calc_nj = Neighbour Joining label.select_score_model = Select score model diff --git a/src/jalview/ext/archaeopteryx/AptxInit.java b/src/jalview/ext/archaeopteryx/AptxInit.java index d76214e..da18a60 100644 --- a/src/jalview/ext/archaeopteryx/AptxInit.java +++ b/src/jalview/ext/archaeopteryx/AptxInit.java @@ -128,10 +128,17 @@ public final class AptxInit nex.setReplaceUnderscores(REPLACE_NHX_UNDERSCORES); nex.setIgnoreQuotes(false); } -// else if (p instanceof PhyloXmlParser) -// { -// MainFrameApplication.warnIfNotPhyloXmlValidation(APTX_CONFIG); -// } + else if (parser instanceof PhyloXmlParser) + { + if ( VALIDATE_PHYLOXML_XSD ) { + JvOptionPane.showInternalMessageDialog( null, + ForesterUtil.wordWrap( + "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]", + 80 ), + "Warning", + JvOptionPane.WARNING_MESSAGE ); + } + } Phylogeny[] trees = PhylogenyMethods.readPhylogenies(parser, treeFile); MainFrame[] aptxFrames = new MainFrame[trees.length]; @@ -517,10 +524,17 @@ public final class AptxInit aptxApp.setMinimumSize(new Dimension(width, height)); // aptxApp.setFont(Desktop.instance.getFont()); // aptxApp.getMainPanel().setFont(Desktop.instance.getFont()); - - Desktop.addInternalFrame(aptxApp, "Archaeopteryx Tree View", true, - width, height, true, true); - + String frameTitle = MessageManager.getString("label.aptx_title"); + File treeFile = aptxApp.getMainPanel().getCurrentTreePanel() + .getTreeFile(); + if (treeFile != null) + { + frameTitle += MessageManager.formatMessage("label.aptx_title_append", + new String[] + { treeFile.getAbsolutePath() }); + } + Desktop.addInternalFrame(aptxApp, frameTitle, true, width, height, true, + true); return aptxApp; } -- 1.7.10.2