iterating nh parser
[jalview.git] / forester / java / src / org / forester / archaeopteryx / MainFrameApplet.java
index 62cca3a..492ecc0 100644 (file)
@@ -24,7 +24,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.archaeopteryx;
 
@@ -53,7 +53,8 @@ import org.forester.util.ForesterUtil;
 public final class MainFrameApplet extends MainFrame {
 
     private static final long    serialVersionUID = 1941019292746717053L;
-    private final static int     FRAME_X_SIZE     = 640, FRAME_Y_SIZE = 580;
+    private final static int     DEFAULT_FRAME_X_SIZE     = 640;
+    private final static int     DEFAULT_FRAME_Y_SIZE = 580;
     private final ArchaeopteryxA _applet;
     private ButtonGroup          _radio_group_1;
 
@@ -84,7 +85,11 @@ public final class MainFrameApplet extends MainFrame {
         // Load the tree from URL
         if ( url != null ) {
             try {
-                phys = AptxUtil.readPhylogeniesFromUrl( url, getConfiguration().isValidatePhyloXmlAgainstSchema() );
+                phys = AptxUtil.readPhylogeniesFromUrl( url,
+                                                        configuration.isValidatePhyloXmlAgainstSchema(),
+                                                        configuration.isReplaceUnderscoresInNhParsing(),
+                                                        configuration.isInternalNumberAreConfidenceForNhParsing(),
+                                                        configuration.getTaxonomyExtraction() );
             }
             catch ( final Exception e ) {
                 ForesterUtil.printErrorMessage( ArchaeopteryxA.NAME, e.toString() );
@@ -118,7 +123,8 @@ public final class MainFrameApplet extends MainFrame {
         _contentpane = getContentPane();
         _contentpane.setLayout( new BorderLayout() );
         _contentpane.add( _mainpanel, BorderLayout.CENTER );
-        setSize( FRAME_X_SIZE, FRAME_Y_SIZE );
+        setSize( getConfiguration().getFrameXSize() > 40 ? getConfiguration().getFrameXSize() : DEFAULT_FRAME_X_SIZE,
+                 getConfiguration().getFrameYSize() > 40 ? getConfiguration().getFrameYSize() : DEFAULT_FRAME_Y_SIZE );
         addWindowListener( new WindowAdapter() {
 
             @Override
@@ -257,9 +263,6 @@ public final class MainFrameApplet extends MainFrame {
         _tools_menu.add( _midpoint_root_item = new JMenuItem( "Midpoint-Root" ) );
         customizeJMenuItem( _midpoint_root_item );
         _tools_menu.addSeparator();
-        _tools_menu
-                .add( _infer_common_sn_names_item = new JMenuItem( "Infer Common Parts of Internal Scientific Names" ) );
-        customizeJMenuItem( _infer_common_sn_names_item );
         _tools_menu.add( _collapse_species_specific_subtrees = new JMenuItem( "Collapse Species-Specific Subtrees" ) );
         customizeJMenuItem( _collapse_species_specific_subtrees );
         _jmenubar.add( _tools_menu );