JAL-2805 JAL-2847 JAL-281 added file path to Aptx frame title
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 5 Dec 2017 11:29:52 +0000 (11:29 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 5 Dec 2017 11:42:27 +0000 (11:42 +0000)
resources/lang/Messages.properties
src/jalview/ext/archaeopteryx/AptxInit.java

index 67af027..eb823af 100644 (file)
@@ -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
index d76214e..da18a60 100644 (file)
@@ -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;
 
   }