in progress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 12 Mar 2015 19:26:02 +0000 (19:26 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 12 Mar 2015 19:26:02 +0000 (19:26 +0000)
forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/archaeopteryx/MainFrame.java
forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java
forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java
forester/java/src/org/forester/archaeopteryx/tools/AncestralTaxonomyInferrer.java

index 38f0516..288cc14 100644 (file)
@@ -650,7 +650,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
             ForesterUtil.printErrorMessage( NAME, "error: " + e );
             e.printStackTrace();
             JOptionPane.showMessageDialog( this, NAME + ": Could not create URL from: \"" + tree_url_str
-                                           + "\"\nException: " + e, "Failed to create URL", JOptionPane.ERROR_MESSAGE );
+                    + "\"\nException: " + e, "Failed to create URL", JOptionPane.ERROR_MESSAGE );
         }
         if ( phys_url == null ) {
             ForesterUtil.printErrorMessage( NAME, "failed to get tree URL from "
@@ -714,7 +714,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
             }
             catch ( final IOException e ) {
                 ForesterUtil.printErrorMessage( NAME, "could not read species tree from  [" + species_tree_url_str
-                                                + "]" );
+                        + "]" );
                 JOptionPane.showMessageDialog( this, NAME + ": could not read species tree from  ["
                         + species_tree_url_str + "]", "Failed to read species tree", JOptionPane.ERROR_MESSAGE );
             }
@@ -732,7 +732,6 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 }
             }
         }
-        //
         try {
             setVisible( false );
             setMainPanel( new MainPanelApplets( getConfiguration(), this ) );
@@ -762,11 +761,11 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 public void componentResized( final ComponentEvent e ) {
                     if ( getMainPanel().getCurrentTreePanel() != null ) {
                         getMainPanel().getCurrentTreePanel().calcParametersForPainting( getMainPanel()
-                                                                                        .getCurrentTreePanel()
-                                                                                        .getWidth(),
+                                                                                                .getCurrentTreePanel()
+                                                                                                .getWidth(),
                                                                                         getMainPanel()
-                                                                                        .getCurrentTreePanel()
-                                                                                        .getHeight() );
+                                                                                                .getCurrentTreePanel()
+                                                                                                .getHeight() );
                     }
                 }
             } );
@@ -788,7 +787,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 AptxUtil.printAppletMessage( NAME, "not using tabbed display" );
                 if ( getSpeciesTree() != null ) {
                     AptxUtil.printAppletMessage( NAME,
-                            "Warning: gsdi (gene duplication inference) only available tabbed display" );
+                                                 "Warning: gsdi (gene duplication inference) only available tabbed display" );
                 }
                 AptxUtil.addPhylogenyToPanel( phys, getConfiguration(), getMainPanel() );
             }
@@ -849,11 +848,11 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 .showInputDialog( this,
                                   "Please the minimum for confidence values to be displayed.\n" + "[current value: "
                                           + getOptions().getMinConfidenceValue() + "]\n",
-                                          "Minimal Confidence Value",
-                                          JOptionPane.QUESTION_MESSAGE,
-                                          null,
-                                          null,
-                                          getOptions().getMinConfidenceValue() );
+                                  "Minimal Confidence Value",
+                                  JOptionPane.QUESTION_MESSAGE,
+                                  null,
+                                  null,
+                                  getOptions().getMinConfidenceValue() );
         if ( !ForesterUtil.isEmpty( s ) ) {
             boolean success = true;
             double m = 0.0;
@@ -880,11 +879,11 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                                                                  "Please enter the default line width for PDF export.\n"
                                                                          + "[current value: "
                                                                          + getOptions().getPrintLineWidth() + "]\n",
-                                                                 "Line Width for PDF Export",
-                                                                 JOptionPane.QUESTION_MESSAGE,
-                                                                 null,
-                                                                 null,
-                                                                 getOptions().getPrintLineWidth() );
+                                                                         "Line Width for PDF Export",
+                                                                         JOptionPane.QUESTION_MESSAGE,
+                                                                         null,
+                                                                         null,
+                                                                         getOptions().getPrintLineWidth() );
         if ( !ForesterUtil.isEmpty( s ) ) {
             boolean success = true;
             float f = 0.0f;
@@ -916,12 +915,12 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                                                                          + Constants.A4_SIZE_Y + "]\n" + "[US Letter: "
                                                                          + Constants.US_LETTER_SIZE_X + ", "
                                                                          + Constants.US_LETTER_SIZE_Y + "]",
-                                                                 "Default Size for Graphics Export",
-                                                                 JOptionPane.QUESTION_MESSAGE,
-                                                                 null,
-                                                                 null,
-                                                                 getOptions().getPrintSizeX() + ", "
-                                                                         + getOptions().getPrintSizeY() );
+                                                                         "Default Size for Graphics Export",
+                                                                         JOptionPane.QUESTION_MESSAGE,
+                                                                         null,
+                                                                         null,
+                                                                         getOptions().getPrintSizeX() + ", "
+                                                                                 + getOptions().getPrintSizeY() );
         if ( !ForesterUtil.isEmpty( s ) && ( s.indexOf( ',' ) > 0 ) ) {
             boolean success = true;
             int x = 0;
@@ -1025,10 +1024,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _analysis_menu.add( _gsdir_item = new JMenuItem( "GSDIR (GSDI with re-rooting)" ) );
         customizeJMenuItem( _gsdi_item );
         customizeJMenuItem( _gsdir_item );
-        //  _analysis_menu.addSeparator();
-        //  _analysis_menu.add( _lineage_inference = new JMenuItem( INFER_ANCESTOR_TAXONOMIES ) );
-        //  customizeJMenuItem( _lineage_inference );
-        //  _lineage_inference.setToolTipText( "Inference of ancestor taxonomies/lineages" );
+        _analysis_menu.addSeparator();
         _jmenubar.add( _analysis_menu );
     }
 
@@ -1106,9 +1102,9 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 MainFrame.setOvPlacementColorChooseMenuItem( _overview_placment_mi, getOptions() );
                 MainFrame.setTextColorChooseMenuItem( _switch_colors_mi, getCurrentTreePanel() );
                 MainFrame
-                .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );
+                        .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );
                 MainFrame.setTextForFontChooserMenuItem( _choose_font_mi, MainFrame
-                                                         .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );
+                        .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );
                 setTextForGraphicsSizeChooserMenuItem( _print_size_mi, getOptions() );
                 setTextForPdfLineWidthChooserMenuItem( _choose_pdf_width_mi, getOptions() );
                 MainFrame.setCycleNodeFillMenuItem( _cycle_node_fill_mi, getOptions() );
@@ -1126,10 +1122,10 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _options_jmenu.add( MainFrame.customizeMenuItemAsLabel( new JMenuItem( MainFrame.DISPLAY_SUBHEADER ),
                                                                 getConfiguration() ) );
         _options_jmenu
-        .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );
+                .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );
         _options_jmenu.add( _uniform_cladograms_rbmi = new JRadioButtonMenuItem( MainFrame.UNIFORM_CLADOGRAMS_LABEL ) );
         _options_jmenu
-        .add( _non_lined_up_cladograms_rbmi = new JRadioButtonMenuItem( MainFrame.NON_LINED_UP_CLADOGRAMS_LABEL ) );
+                .add( _non_lined_up_cladograms_rbmi = new JRadioButtonMenuItem( MainFrame.NON_LINED_UP_CLADOGRAMS_LABEL ) );
         _radio_group_1 = new ButtonGroup();
         _radio_group_1.add( _ext_node_dependent_cladogram_rbmi );
         _radio_group_1.add( _uniform_cladograms_rbmi );
@@ -1137,11 +1133,11 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_OVERVIEW_LABEL ) );
         _options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_SCALE_LABEL ) );
         _options_jmenu
-        .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_INT ) );
+                .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_INT ) );
         _options_jmenu
-        .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_EXT ) );
+                .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_EXT ) );
         _options_jmenu
-        .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );
+                .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );
         _options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );
         if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {
             _options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );
@@ -1150,9 +1146,9 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( MainFrame.SHOW_ANN_REF_SOURCE_LABEL ) );
         _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_CONF_STDDEV_LABEL ) );
         _options_jmenu
-        .add( _color_by_taxonomic_group_cbmi = new JCheckBoxMenuItem( MainFrame.COLOR_BY_TAXONOMIC_GROUP ) );
+                .add( _color_by_taxonomic_group_cbmi = new JCheckBoxMenuItem( MainFrame.COLOR_BY_TAXONOMIC_GROUP ) );
         _options_jmenu
-        .add( _color_labels_same_as_parent_branch = new JCheckBoxMenuItem( MainFrame.COLOR_LABELS_LABEL ) );
+                .add( _color_labels_same_as_parent_branch = new JCheckBoxMenuItem( MainFrame.COLOR_LABELS_LABEL ) );
         _color_labels_same_as_parent_branch.setToolTipText( MainFrame.COLOR_LABELS_TIP );
         _options_jmenu.add( _abbreviate_scientific_names = new JCheckBoxMenuItem( MainFrame.ABBREV_SN_LABEL ) );
         _options_jmenu.add( _label_direction_cbmi = new JCheckBoxMenuItem( MainFrame.LABEL_DIRECTION_LABEL ) );
@@ -1170,12 +1166,12 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _options_jmenu.add( MainFrame.customizeMenuItemAsLabel( new JMenuItem( MainFrame.SEARCH_SUBHEADER ),
                                                                 getConfiguration() ) );
         _options_jmenu
-        .add( _search_case_senstive_cbmi = new JCheckBoxMenuItem( MainFrame.SEARCH_CASE_SENSITIVE_LABEL ) );
+                .add( _search_case_senstive_cbmi = new JCheckBoxMenuItem( MainFrame.SEARCH_CASE_SENSITIVE_LABEL ) );
         _options_jmenu.add( _search_whole_words_only_cbmi = new JCheckBoxMenuItem( MainFrame.SEARCH_TERMS_ONLY_LABEL ) );
         _options_jmenu.add( _search_with_regex_cbmi = new JCheckBoxMenuItem( MainFrame.SEARCH_REGEX_LABEL ) );
         _search_with_regex_cbmi.setToolTipText( MainFrame.SEARCH_WITH_REGEX_TIP );
         _options_jmenu
-        .add( _inverse_search_result_cbmi = new JCheckBoxMenuItem( MainFrame.INVERSE_SEARCH_RESULT_LABEL ) );
+                .add( _inverse_search_result_cbmi = new JCheckBoxMenuItem( MainFrame.INVERSE_SEARCH_RESULT_LABEL ) );
         //
         _options_jmenu.addSeparator();
         _options_jmenu.add( MainFrame.customizeMenuItemAsLabel( new JMenuItem( "Graphics Export & Printing:" ),
@@ -1183,11 +1179,11 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _options_jmenu.add( _antialias_print_cbmi = new JCheckBoxMenuItem( "Antialias" ) );
         _options_jmenu.add( _print_black_and_white_cbmi = new JCheckBoxMenuItem( "Export in Black and White" ) );
         _options_jmenu
-        .add( _print_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PDF export and Printing" ) );
+                .add( _print_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PDF export and Printing" ) );
         _options_jmenu
-        .add( _graphics_export_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PNG, JPG, and GIF export" ) );
+                .add( _graphics_export_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PNG, JPG, and GIF export" ) );
         _options_jmenu
-        .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );
+                .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );
         _options_jmenu.add( _print_size_mi = new JMenuItem( "" ) );
         _options_jmenu.add( _choose_pdf_width_mi = new JMenuItem( "" ) );
         //
@@ -1196,7 +1192,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         customizeCheckBoxMenuItem( _graphics_export_visible_only_cbmi, getOptions().isGraphicsExportVisibleOnly() );
         customizeCheckBoxMenuItem( _print_using_actual_size_cbmi, getOptions().isPrintUsingActualSize() );
         customizeCheckBoxMenuItem( _graphics_export_using_actual_size_cbmi, getOptions()
-                                   .isGraphicsExportUsingActualSize() );
+                .isGraphicsExportUsingActualSize() );
         customizeJMenuItem( _print_size_mi );
         customizeJMenuItem( _choose_pdf_width_mi );
         //
@@ -1213,11 +1209,11 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         customizeCheckBoxMenuItem( _show_annotation_ref_source, getOptions().isShowAnnotationRefSource() );
         customizeCheckBoxMenuItem( _abbreviate_scientific_names, getOptions().isAbbreviateScientificTaxonNames() );
         customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions()
-                                   .isShowDefaultNodeShapesExternal() );
+                .isShowDefaultNodeShapesExternal() );
         customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions()
-                                   .isShowDefaultNodeShapesInternal() );
+                .isShowDefaultNodeShapesInternal() );
         customizeCheckBoxMenuItem( _show_default_node_shapes_for_marked_cbmi, getOptions()
-                                   .isShowDefaultNodeShapesForMarkedNodes() );
+                .isShowDefaultNodeShapesForMarkedNodes() );
         customizeJMenuItem( _cycle_node_shape_mi );
         customizeJMenuItem( _cycle_node_fill_mi );
         customizeJMenuItem( _choose_node_size_mi );
@@ -1249,7 +1245,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         _tools_menu.addSeparator();
         _tools_menu.add( _remove_visual_styles_item = new JMenuItem( "Delete All Visual Styles From Nodes" ) );
         _remove_visual_styles_item
-        .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny." );
+                .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny." );
         customizeJMenuItem( _remove_visual_styles_item );
         _tools_menu.add( _remove_branch_color_item = new JMenuItem( "Delete All Colors From Branches" ) );
         _remove_branch_color_item.setToolTipText( "To remove all branch color values from the current phylogeny." );
@@ -1290,7 +1286,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
     void buildViewMenu() {
         _view_jmenu = MainFrame.createMenu( "View", getConfiguration() );
         _view_jmenu
-        .add( _display_basic_information_item = new JMenuItem( MainFrame.SHOW_BASIC_TREE_INFORMATION_LABEL ) );
+                .add( _display_basic_information_item = new JMenuItem( MainFrame.SHOW_BASIC_TREE_INFORMATION_LABEL ) );
         _view_jmenu.addSeparator();
         _view_jmenu.add( _view_as_XML_item = new JMenuItem( "as phyloXML" ) );
         _view_jmenu.add( _view_as_NH_item = new JMenuItem( "as Newick" ) );
@@ -1409,8 +1405,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                                                    + gsdi.getStrippedExternalGeneTreeNodes().size() + "\n"
                                                    + "Taxonomy linkage based on: " + gsdi.getTaxCompBase() + "\n"
                                                    + "Number of polytomies in species tree used: " + poly + "\n",
-                                                   "GSDI successfully completed",
-                                                   JOptionPane.WARNING_MESSAGE );
+                                           "GSDI successfully completed",
+                                           JOptionPane.WARNING_MESSAGE );
         }
         else {
             JOptionPane.showMessageDialog( this,
@@ -1422,8 +1418,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                                                    + gsdi.getStrippedExternalGeneTreeNodes().size() + "\n"
                                                    + "Taxonomy linkage based on: " + gsdi.getTaxCompBase() + "\n"
                                                    + "Number of polytomies in species tree used: " + poly + "\n",
-                                                   "GSDI successfully completed",
-                                                   JOptionPane.INFORMATION_MESSAGE );
+                                           "GSDI successfully completed",
+                                           JOptionPane.INFORMATION_MESSAGE );
         }
     }
 
@@ -1482,8 +1478,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                                                    + gsdir.getStrippedExternalGeneTreeNodes().size() + "\n"
                                                    + "Taxonomy linkage based on: " + gsdir.getTaxCompBase() + "\n"
                                                    + "Number of polytomies in species tree used: " + poly + "\n",
-                                                   "GSDIR successfully completed",
-                                                   JOptionPane.WARNING_MESSAGE );
+                                           "GSDIR successfully completed",
+                                           JOptionPane.WARNING_MESSAGE );
         }
         else {
             JOptionPane.showMessageDialog( this,
@@ -1493,8 +1489,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                                                    + gsdir.getStrippedExternalGeneTreeNodes().size() + "\n"
                                                    + "Taxonomy linkage based on: " + gsdir.getTaxCompBase() + "\n"
                                                    + "Number of polytomies in species tree used: " + poly + "\n",
-                                                   "GSDIR successfully completed",
-                                                   JOptionPane.INFORMATION_MESSAGE );
+                                           "GSDIR successfully completed",
+                                           JOptionPane.INFORMATION_MESSAGE );
         }
     }
 
@@ -1609,10 +1605,10 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         if ( getCurrentTreePanel() != null ) {
             if ( getCurrentTreePanel().isCurrentTreeIsSubtree() ) {
                 JOptionPane
-                .showMessageDialog( this,
-                                    "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",
-                                    "Operation can not be exectuted on a sub-tree",
-                                    JOptionPane.WARNING_MESSAGE );
+                        .showMessageDialog( this,
+                                            "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",
+                                            "Operation can not be exectuted on a sub-tree",
+                                            JOptionPane.WARNING_MESSAGE );
                 return true;
             }
         }
@@ -1741,20 +1737,20 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
     void updateOptions( final Options options ) {
         options.setAntialiasScreen( ( _screen_antialias_cbmi != null ) && _screen_antialias_cbmi.isSelected() );
         options.setBackgroundColorGradient( ( _background_gradient_cbmi != null )
-                                            && _background_gradient_cbmi.isSelected() );
+                && _background_gradient_cbmi.isSelected() );
         options.setShowDomainLabels( ( _show_domain_labels != null ) && _show_domain_labels.isSelected() );
         options.setShowAnnotationRefSource( ( _show_annotation_ref_source != null )
-                                            && _show_annotation_ref_source.isSelected() );
+                && _show_annotation_ref_source.isSelected() );
         options.setAbbreviateScientificTaxonNames( ( _abbreviate_scientific_names != null )
-                                                   && _abbreviate_scientific_names.isSelected() );
+                && _abbreviate_scientific_names.isSelected() );
         options.setColorLabelsSameAsParentBranch( ( _color_labels_same_as_parent_branch != null )
-                                                  && _color_labels_same_as_parent_branch.isSelected() );
+                && _color_labels_same_as_parent_branch.isSelected() );
         options.setShowDefaultNodeShapesInternal( ( _show_default_node_shapes_internal_cbmi != null )
-                                                  && _show_default_node_shapes_internal_cbmi.isSelected() );
+                && _show_default_node_shapes_internal_cbmi.isSelected() );
         options.setShowDefaultNodeShapesExternal( ( _show_default_node_shapes_external_cbmi != null )
-                                                  && _show_default_node_shapes_external_cbmi.isSelected() );
+                && _show_default_node_shapes_external_cbmi.isSelected() );
         options.setShowDefaultNodeShapesForMarkedNodes( ( _show_default_node_shapes_for_marked_cbmi != null )
-                                                        && _show_default_node_shapes_for_marked_cbmi.isSelected() );
+                && _show_default_node_shapes_for_marked_cbmi.isSelected() );
         if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) {
             options.setCladogramType( CLADOGRAM_TYPE.NON_LINED_UP );
         }
@@ -1765,7 +1761,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
             options.setCladogramType( CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );
         }
         options.setSearchCaseSensitive( ( _search_case_senstive_cbmi != null )
-                                        && _search_case_senstive_cbmi.isSelected() );
+                && _search_case_senstive_cbmi.isSelected() );
         if ( ( _show_scale_cbmi != null ) && _show_scale_cbmi.isEnabled() ) {
             options.setShowScale( _show_scale_cbmi.isSelected() );
         }
@@ -1779,19 +1775,19 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         }
         options.setShowOverview( ( _show_overview_cbmi != null ) && _show_overview_cbmi.isSelected() );
         options.setShowConfidenceStddev( ( _show_confidence_stddev_cbmi != null )
-                                         && _show_confidence_stddev_cbmi.isSelected() );
+                && _show_confidence_stddev_cbmi.isSelected() );
         options.setMatchWholeTermsOnly( ( _search_whole_words_only_cbmi != null )
-                                        && _search_whole_words_only_cbmi.isSelected() );
+                && _search_whole_words_only_cbmi.isSelected() );
         options.setSearchWithRegex( ( _search_with_regex_cbmi != null ) && _search_with_regex_cbmi.isSelected() );
         options.setInverseSearchResult( ( _inverse_search_result_cbmi != null )
-                                        && _inverse_search_result_cbmi.isSelected() );
+                && _inverse_search_result_cbmi.isSelected() );
         options.setPrintUsingActualSize( ( _print_using_actual_size_cbmi != null )
-                && ( _print_using_actual_size_cbmi.isSelected() ) );
+                                         && ( _print_using_actual_size_cbmi.isSelected() ) );
         options.setGraphicsExportUsingActualSize( ( _graphics_export_using_actual_size_cbmi != null )
-                && ( _graphics_export_using_actual_size_cbmi.isSelected() ) );
+                                                  && ( _graphics_export_using_actual_size_cbmi.isSelected() ) );
         options.setAntialiasPrint( ( _antialias_print_cbmi != null ) && _antialias_print_cbmi.isSelected() );
         options.setPrintBlackAndWhite( ( _print_black_and_white_cbmi != null )
-                && _print_black_and_white_cbmi.isSelected() );
+                                       && _print_black_and_white_cbmi.isSelected() );
         if ( ( _rectangular_type_cbmi != null ) && _rectangular_type_cbmi.isSelected() ) {
             options.setPhylogenyGraphicsType( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
         }
@@ -1849,8 +1845,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 title = "\"" + getMainPanel().getCurrentPhylogeny().getName() + "\" in " + title;
             }
             showTextFrame( getMainPanel().getCurrentPhylogeny().toNexus( getOptions()
-                                                                         .getNhConversionSupportValueStyle() ),
-                                                                         title );
+                                   .getNhConversionSupportValueStyle() ),
+                           title );
         }
     }
 
@@ -1861,8 +1857,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
                 title = "\"" + getMainPanel().getCurrentPhylogeny().getName() + "\" in " + title;
             }
             showTextFrame( getMainPanel().getCurrentPhylogeny().toNewHampshire( getOptions()
-                                                                                .getNhConversionSupportValueStyle() ),
-                                                                                title );
+                                   .getNhConversionSupportValueStyle() ),
+                           title );
         }
     }
 
index a1aa273..f5772f3 100644 (file)
@@ -42,11 +42,11 @@ public final class Constants {
     public final static boolean __SYNTH_LF                                                    = false;                                                                             // TODO remove me
     public final static boolean ALLOW_DDBJ_BLAST                                              = false;
     public final static String  PRG_NAME                                                      = "Archaeopteryx";
-    final static String         VERSION                                                       = "0.9907 experimental";
-    final static String         PRG_DATE                                                      = "150311";
+    final static String         VERSION                                                       = "0.9908 experimental";
+    final static String         PRG_DATE                                                      = "150312";
     final static String         DEFAULT_CONFIGURATION_FILE_NAME                               = "_aptx_configuration_file";
     final static String[]       DEFAULT_FONT_CHOICES                                          = { "Arial", "Helvetica",
-            "Verdana", "Tahoma", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans"  };
+        "Verdana", "Tahoma", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans"  };
     final static boolean        VERBOSE_DEFAULT                                               = false;
     final static int            DOMAIN_STRUCTURE_DEFAULT_WIDTH                                = 100;
     final static String         AUTHOR_EMAIL                                                  = "phyloxml@gmail.com";
index 28398f7..a9bdd9f 100644 (file)
@@ -58,6 +58,7 @@ import org.forester.archaeopteryx.AptxUtil.GraphicsExportType;
 import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE;\r
 import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;\r
 import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;\r
+import org.forester.archaeopteryx.tools.AncestralTaxonomyInferrer;\r
 import org.forester.archaeopteryx.tools.InferenceManager;\r
 import org.forester.archaeopteryx.tools.ProcessPool;\r
 import org.forester.archaeopteryx.tools.ProcessRunning;\r
@@ -145,6 +146,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     static final String              SHOW_BASIC_TREE_INFORMATION_LABEL       = "Basic Tree Information";\r
     static final String              RIGHT_LINE_UP_DOMAINS                   = "Right-align Domain Architectures";\r
     static final String              LINE_UP_RENDERABLE_DATA                 = "Line Up Diagrams (such as Domain Architectures)";\r
+    static final String              INFER_ANCESTOR_TAXONOMIES               = "Infer Ancestor Taxonomies";\r
+    static final String              OBTAIN_DETAILED_TAXONOMIC_INFORMATION   = "Obtain Detailed Taxonomic Information";\r
     JMenuBar                         _jmenubar;\r
     JMenu                            _file_jmenu;\r
     JMenu                            _tools_menu;\r
@@ -730,6 +733,16 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         else if ( o == _choose_pdf_width_mi ) {\r
             choosePdfWidth();\r
         }\r
+        else if ( o == _lineage_inference ) {\r
+            if ( isSubtreeDisplayed() ) {\r
+                JOptionPane.showMessageDialog( this,\r
+                                               "Subtree is shown.",\r
+                                               "Cannot infer ancestral taxonomies",\r
+                                               JOptionPane.ERROR_MESSAGE );\r
+                return;\r
+            }\r
+            executeLineageInference();\r
+        }\r
         else {\r
             if ( _load_phylogeny_from_webservice_menu_items != null ) {\r
                 for( int i = 0; i < _load_phylogeny_from_webservice_menu_items.length; ++i ) {\r
@@ -812,10 +825,10 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             }\r
             if ( ( nodes == null ) || nodes.isEmpty() ) {\r
                 JOptionPane\r
-                        .showMessageDialog( this,\r
-                                            "Need to select nodes, either via direct selection or via the \"Search\" function",\r
-                                            "No nodes selected for annotation",\r
-                                            JOptionPane.ERROR_MESSAGE );\r
+                .showMessageDialog( this,\r
+                                    "Need to select nodes, either via direct selection or via the \"Search\" function",\r
+                                    "No nodes selected for annotation",\r
+                                    JOptionPane.ERROR_MESSAGE );\r
                 return;\r
             }\r
             final Phylogeny phy = getMainPanel().getCurrentPhylogeny();\r
@@ -834,7 +847,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                                   my_panel,\r
                                                                   "Enter the sequence annotation(s) for the "\r
                                                                           + nodes.size() + " selected nodes",\r
-                                                                  JOptionPane.OK_CANCEL_OPTION );\r
+                                                                          JOptionPane.OK_CANCEL_OPTION );\r
                 if ( result == JOptionPane.OK_OPTION ) {\r
                     String ref = ref_field.getText();\r
                     String desc = desc_filed.getText();\r
@@ -861,7 +874,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                         for( final PhylogenyNode n : nodes ) {\r
                             ForesterUtil.ensurePresenceOfSequence( n );\r
                             final Annotation ann = ForesterUtil.isEmpty( ref ) ? new Annotation()\r
-                                    : new Annotation( ref );\r
+                            : new Annotation( ref );\r
                             if ( !ForesterUtil.isEmpty( desc ) ) {\r
                                 ann.setDesc( desc );\r
                             }\r
@@ -886,11 +899,11 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                 .showInputDialog( this,\r
                                   "Please enter the minimum for confidence values to be displayed.\n"\r
                                           + "[current value: " + getOptions().getMinConfidenceValue() + "]\n",\r
-                                  "Minimal Confidence Value",\r
-                                  JOptionPane.QUESTION_MESSAGE,\r
-                                  null,\r
-                                  null,\r
-                                  getOptions().getMinConfidenceValue() );\r
+                                          "Minimal Confidence Value",\r
+                                          JOptionPane.QUESTION_MESSAGE,\r
+                                          null,\r
+                                          null,\r
+                                          getOptions().getMinConfidenceValue() );\r
         if ( !ForesterUtil.isEmpty( s ) ) {\r
             boolean success = true;\r
             double m = 0.0;\r
@@ -932,10 +945,10 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         }\r
         if ( ( nodes == null ) || nodes.isEmpty() ) {\r
             JOptionPane\r
-                    .showMessageDialog( this,\r
-                                        "Need to select external nodes, either via direct selection or via the \"Search\" function",\r
-                                        "No external nodes selected to " + function.toLowerCase(),\r
-                                        JOptionPane.ERROR_MESSAGE );\r
+            .showMessageDialog( this,\r
+                                "Need to select external nodes, either via direct selection or via the \"Search\" function",\r
+                                "No external nodes selected to " + function.toLowerCase(),\r
+                                JOptionPane.ERROR_MESSAGE );\r
             return;\r
         }\r
         final int todo = nodes.size();\r
@@ -952,8 +965,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             return;\r
         }\r
         final int result = JOptionPane.showConfirmDialog( null, function + " " + todo\r
-                + " external node(s), from a total of " + ext + " external nodes," + "\nresulting in tree with " + res\r
-                + " nodes?", function + " external nodes", JOptionPane.OK_CANCEL_OPTION );\r
+                                                          + " external node(s), from a total of " + ext + " external nodes," + "\nresulting in tree with " + res\r
+                                                          + " nodes?", function + " external nodes", JOptionPane.OK_CANCEL_OPTION );\r
         if ( result == JOptionPane.OK_OPTION ) {\r
             if ( !delete ) {\r
                 final List<PhylogenyNode> to_delete = new ArrayList<PhylogenyNode>();\r
@@ -1223,11 +1236,11 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                                  "Please enter the default line width for PDF export.\n"\r
                                                                          + "[current value: "\r
                                                                          + getOptions().getPrintLineWidth() + "]\n",\r
-                                                                 "Line Width for PDF Export",\r
-                                                                 JOptionPane.QUESTION_MESSAGE,\r
-                                                                 null,\r
-                                                                 null,\r
-                                                                 getOptions().getPrintLineWidth() );\r
+                                                                         "Line Width for PDF Export",\r
+                                                                         JOptionPane.QUESTION_MESSAGE,\r
+                                                                         null,\r
+                                                                         null,\r
+                                                                         getOptions().getPrintLineWidth() );\r
         if ( !ForesterUtil.isEmpty( s ) ) {\r
             boolean success = true;\r
             float f = 0.0f;\r
@@ -1259,12 +1272,12 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                                          + Constants.A4_SIZE_Y + "]\n" + "[US Letter: "\r
                                                                          + Constants.US_LETTER_SIZE_X + ", "\r
                                                                          + Constants.US_LETTER_SIZE_Y + "]",\r
-                                                                 "Default Size for Graphics Export",\r
-                                                                 JOptionPane.QUESTION_MESSAGE,\r
-                                                                 null,\r
-                                                                 null,\r
-                                                                 getOptions().getPrintSizeX() + ", "\r
-                                                                         + getOptions().getPrintSizeY() );\r
+                                                                         "Default Size for Graphics Export",\r
+                                                                         JOptionPane.QUESTION_MESSAGE,\r
+                                                                         null,\r
+                                                                         null,\r
+                                                                         getOptions().getPrintSizeX() + ", "\r
+                                                                                 + getOptions().getPrintSizeY() );\r
         if ( !ForesterUtil.isEmpty( s ) && ( s.indexOf( ',' ) > 0 ) ) {\r
             boolean success = true;\r
             int x = 0;\r
@@ -1443,8 +1456,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                    + gsdi.getStrippedExternalGeneTreeNodes().size() + "\n"\r
                                                    + "Taxonomy linkage based on: " + gsdi.getTaxCompBase() + "\n"\r
                                                    + "Number of polytomies in species tree used: " + poly + "\n",\r
-                                           "GSDI successfully completed",\r
-                                           JOptionPane.WARNING_MESSAGE );\r
+                                                   "GSDI successfully completed",\r
+                                                   JOptionPane.WARNING_MESSAGE );\r
         }\r
         else {\r
             JOptionPane.showMessageDialog( this,\r
@@ -1456,8 +1469,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                    + gsdi.getStrippedExternalGeneTreeNodes().size() + "\n"\r
                                                    + "Taxonomy linkage based on: " + gsdi.getTaxCompBase() + "\n"\r
                                                    + "Number of polytomies in species tree used: " + poly + "\n",\r
-                                           "GSDI successfully completed",\r
-                                           JOptionPane.INFORMATION_MESSAGE );\r
+                                                   "GSDI successfully completed",\r
+                                                   JOptionPane.INFORMATION_MESSAGE );\r
         }\r
     }\r
 \r
@@ -1516,8 +1529,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                    + gsdir.getStrippedExternalGeneTreeNodes().size() + "\n"\r
                                                    + "Taxonomy linkage based on: " + gsdir.getTaxCompBase() + "\n"\r
                                                    + "Number of polytomies in species tree used: " + poly + "\n",\r
-                                           "GSDIR successfully completed",\r
-                                           JOptionPane.WARNING_MESSAGE );\r
+                                                   "GSDIR successfully completed",\r
+                                                   JOptionPane.WARNING_MESSAGE );\r
         }\r
         else {\r
             JOptionPane.showMessageDialog( this,\r
@@ -1527,9 +1540,27 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                    + gsdir.getStrippedExternalGeneTreeNodes().size() + "\n"\r
                                                    + "Taxonomy linkage based on: " + gsdir.getTaxCompBase() + "\n"\r
                                                    + "Number of polytomies in species tree used: " + poly + "\n",\r
-                                           "GSDIR successfully completed",\r
-                                           JOptionPane.INFORMATION_MESSAGE );\r
+                                                   "GSDIR successfully completed",\r
+                                                   JOptionPane.INFORMATION_MESSAGE );\r
+        }\r
+    }\r
+\r
+    void executeLineageInference() {\r
+        if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) {\r
+            return;\r
+        }\r
+        if ( !_mainpanel.getCurrentPhylogeny().isRooted() ) {\r
+            JOptionPane.showMessageDialog( this,\r
+                                           "Phylogeny is not rooted.",\r
+                                           "Cannot infer ancestral taxonomies",\r
+                                           JOptionPane.ERROR_MESSAGE );\r
+            return;\r
         }\r
+        final AncestralTaxonomyInferrer inferrer = new AncestralTaxonomyInferrer( this,\r
+                                                                                  _mainpanel.getCurrentTreePanel(),\r
+                                                                                  _mainpanel.getCurrentPhylogeny()\r
+                                                                                  .copy() );\r
+        new Thread( inferrer ).start();\r
     }\r
 \r
     boolean GAndSDoHaveMoreThanOneSpeciesInComman( final Phylogeny gene_tree ) {\r
@@ -1662,10 +1693,10 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         if ( getCurrentTreePanel() != null ) {\r
             if ( getCurrentTreePanel().isCurrentTreeIsSubtree() ) {\r
                 JOptionPane\r
-                        .showMessageDialog( this,\r
-                                            "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",\r
-                                            "Operation can not be exectuted on a sub-tree",\r
-                                            JOptionPane.WARNING_MESSAGE );\r
+                .showMessageDialog( this,\r
+                                    "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",\r
+                                    "Operation can not be exectuted on a sub-tree",\r
+                                    JOptionPane.WARNING_MESSAGE );\r
                 return true;\r
             }\r
         }\r
@@ -1816,20 +1847,20 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     void updateOptions( final Options options ) {\r
         options.setAntialiasScreen( ( _screen_antialias_cbmi != null ) && _screen_antialias_cbmi.isSelected() );\r
         options.setBackgroundColorGradient( ( _background_gradient_cbmi != null )\r
-                && _background_gradient_cbmi.isSelected() );\r
+                                            && _background_gradient_cbmi.isSelected() );\r
         options.setShowDomainLabels( ( _show_domain_labels != null ) && _show_domain_labels.isSelected() );\r
         options.setShowAnnotationRefSource( ( _show_annotation_ref_source != null )\r
-                && _show_annotation_ref_source.isSelected() );\r
+                                            && _show_annotation_ref_source.isSelected() );\r
         options.setAbbreviateScientificTaxonNames( ( _abbreviate_scientific_names != null )\r
-                && _abbreviate_scientific_names.isSelected() );\r
+                                                   && _abbreviate_scientific_names.isSelected() );\r
         options.setColorLabelsSameAsParentBranch( ( _color_labels_same_as_parent_branch != null )\r
-                && _color_labels_same_as_parent_branch.isSelected() );\r
+                                                  && _color_labels_same_as_parent_branch.isSelected() );\r
         options.setShowDefaultNodeShapesInternal( ( _show_default_node_shapes_internal_cbmi != null )\r
-                && _show_default_node_shapes_internal_cbmi.isSelected() );\r
+                                                  && _show_default_node_shapes_internal_cbmi.isSelected() );\r
         options.setShowDefaultNodeShapesExternal( ( _show_default_node_shapes_external_cbmi != null )\r
-                && _show_default_node_shapes_external_cbmi.isSelected() );\r
+                                                  && _show_default_node_shapes_external_cbmi.isSelected() );\r
         options.setShowDefaultNodeShapesForMarkedNodes( ( _show_default_node_shapes_for_marked_cbmi != null )\r
-                && _show_default_node_shapes_for_marked_cbmi.isSelected() );\r
+                                                        && _show_default_node_shapes_for_marked_cbmi.isSelected() );\r
         if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) {\r
             options.setCladogramType( CLADOGRAM_TYPE.NON_LINED_UP );\r
         }\r
@@ -1840,7 +1871,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             options.setCladogramType( CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );\r
         }\r
         options.setSearchCaseSensitive( ( _search_case_senstive_cbmi != null )\r
-                && _search_case_senstive_cbmi.isSelected() );\r
+                                        && _search_case_senstive_cbmi.isSelected() );\r
         if ( ( _show_scale_cbmi != null ) && _show_scale_cbmi.isEnabled() ) {\r
             options.setShowScale( _show_scale_cbmi.isSelected() );\r
         }\r
@@ -1854,14 +1885,14 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         }\r
         options.setShowOverview( ( _show_overview_cbmi != null ) && _show_overview_cbmi.isSelected() );\r
         options.setShowConfidenceStddev( ( _show_confidence_stddev_cbmi != null )\r
-                && _show_confidence_stddev_cbmi.isSelected() );\r
+                                         && _show_confidence_stddev_cbmi.isSelected() );\r
         if ( ( _color_by_taxonomic_group_cbmi != null ) && _color_by_taxonomic_group_cbmi.isEnabled() ) {\r
             options.setColorByTaxonomicGroup( _color_by_taxonomic_group_cbmi.isSelected() );\r
         }\r
         options.setPrintUsingActualSize( ( _print_using_actual_size_cbmi != null )\r
-                && ( _print_using_actual_size_cbmi.isSelected() ) );\r
+                                         && ( _print_using_actual_size_cbmi.isSelected() ) );\r
         options.setGraphicsExportUsingActualSize( ( _graphics_export_using_actual_size_cbmi != null )\r
-                && ( _graphics_export_using_actual_size_cbmi.isSelected() ) );\r
+                                                  && ( _graphics_export_using_actual_size_cbmi.isSelected() ) );\r
         options.setAntialiasPrint( ( _antialias_print_cbmi != null ) && _antialias_print_cbmi.isSelected() );\r
         if ( ( _use_brackets_for_conf_in_nh_export_cbmi != null )\r
                 && _use_brackets_for_conf_in_nh_export_cbmi.isSelected() ) {\r
@@ -1875,9 +1906,9 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             options.setNhConversionSupportValueStyle( NH_CONVERSION_SUPPORT_VALUE_STYLE.NONE );\r
         }\r
         options.setPrintBlackAndWhite( ( _print_black_and_white_cbmi != null )\r
-                && _print_black_and_white_cbmi.isSelected() );\r
+                                       && _print_black_and_white_cbmi.isSelected() );\r
         options.setInternalNumberAreConfidenceForNhParsing( ( _internal_number_are_confidence_for_nh_parsing_cbmi != null )\r
-                && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() );\r
+                                                            && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() );\r
         if ( ( _extract_taxonomy_pfam_strict_rbmi != null ) && _extract_taxonomy_pfam_strict_rbmi.isSelected() ) {\r
             options.setTaxonomyExtraction( TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT );\r
         }\r
@@ -1891,14 +1922,14 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             options.setTaxonomyExtraction( TAXONOMY_EXTRACTION.NO );\r
         }\r
         options.setReplaceUnderscoresInNhParsing( ( _replace_underscores_cbmi != null )\r
-                && _replace_underscores_cbmi.isSelected() );\r
+                                                  && _replace_underscores_cbmi.isSelected() );\r
         options.setAllowErrorsInDistanceToParent( ( _allow_errors_in_distance_to_parent_cbmi != null )\r
-                && _allow_errors_in_distance_to_parent_cbmi.isSelected() );\r
+                                                  && _allow_errors_in_distance_to_parent_cbmi.isSelected() );\r
         options.setMatchWholeTermsOnly( ( _search_whole_words_only_cbmi != null )\r
-                && _search_whole_words_only_cbmi.isSelected() );\r
+                                        && _search_whole_words_only_cbmi.isSelected() );\r
         options.setSearchWithRegex( ( _search_with_regex_cbmi != null ) && _search_with_regex_cbmi.isSelected() );\r
         options.setInverseSearchResult( ( _inverse_search_result_cbmi != null )\r
-                && _inverse_search_result_cbmi.isSelected() );\r
+                                        && _inverse_search_result_cbmi.isSelected() );\r
         if ( _graphics_export_visible_only_cbmi != null ) {\r
             options.setGraphicsExportVisibleOnly( _graphics_export_visible_only_cbmi.isSelected() );\r
             if ( _graphics_export_visible_only_cbmi.isSelected() && ( _graphics_export_using_actual_size_cbmi != null ) ) {\r
@@ -1964,8 +1995,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                 title = "\"" + getMainPanel().getCurrentPhylogeny().getName() + "\" in " + title;\r
             }\r
             showTextFrame( _mainpanel.getCurrentPhylogeny().toNewHampshire( getOptions()\r
-                                   .getNhConversionSupportValueStyle() ),\r
-                           title );\r
+                                                                            .getNhConversionSupportValueStyle() ),\r
+                                                                            title );\r
         }\r
     }\r
 \r
@@ -2054,11 +2085,11 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                                                                  "Please enter the default size for node shapes.\n"\r
                                                                          + "[current value: "\r
                                                                          + options.getDefaultNodeShapeSize() + "]\n",\r
-                                                                 "Node Shape Size",\r
-                                                                 JOptionPane.QUESTION_MESSAGE,\r
-                                                                 null,\r
-                                                                 null,\r
-                                                                 options.getDefaultNodeShapeSize() );\r
+                                                                         "Node Shape Size",\r
+                                                                         JOptionPane.QUESTION_MESSAGE,\r
+                                                                         null,\r
+                                                                         null,\r
+                                                                         options.getDefaultNodeShapeSize() );\r
         if ( !ForesterUtil.isEmpty( s ) ) {\r
             boolean success = true;\r
             double m = 0.0;\r
@@ -2238,8 +2269,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                 JOptionPane.showMessageDialog( comp,\r
                                                "There was an unknown problem when attempting to write to PDF file: \""\r
                                                        + file_name + "\"",\r
-                                               "Error",\r
-                                               JOptionPane.ERROR_MESSAGE );\r
+                                                       "Error",\r
+                                                       JOptionPane.ERROR_MESSAGE );\r
             }\r
         }\r
         if ( !opts.isPrintUsingActualSize() ) {\r
@@ -2288,7 +2319,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     static void setTextColorChooseMenuItem( final JMenuItem mi, final TreePanel tree_panel ) {\r
         if ( ( tree_panel != null ) && ( tree_panel.getTreeColorSet() != null ) ) {\r
             mi.setText( "Select Color Scheme... (current: " + tree_panel.getTreeColorSet().getCurrentColorSchemeName()\r
-                    + ")" );\r
+                        + ")" );\r
         }\r
         else {\r
             mi.setText( "Select Color Scheme..." );\r
@@ -2400,8 +2431,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                 JOptionPane.showMessageDialog( comp,\r
                                                "There was an unknown problem when attempting to write to an image file: \""\r
                                                        + file_name + "\"",\r
-                                               "Error",\r
-                                               JOptionPane.ERROR_MESSAGE );\r
+                                                       "Error",\r
+                                                       JOptionPane.ERROR_MESSAGE );\r
             }\r
         }\r
         contentpane.repaint();\r
index 6374275..5d753af 100644 (file)
@@ -81,13 +81,11 @@ public final class MainFrameApplet extends MainFrame {
         }
         // build the menu bar
         _jmenubar = new JMenuBar();
+        buildFileMenu();
         if ( !_configuration.isUseNativeUI() ) {
             _jmenubar.setBackground( _configuration.getGuiMenuBackgroundColor() );
         }
-        if ( getSpeciesTree() != null ) {
-            buildAnalysisMenu();
-        }
-        buildFileMenu();
+        buildAnalysisMenu();
         buildToolsMenu();
         buildViewMenu();
         buildFontSizeMenu();
@@ -163,14 +161,16 @@ public final class MainFrameApplet extends MainFrame {
 
     void buildAnalysisMenu() {
         _analysis_menu = MainFrame.createMenu( "Analysis", getConfiguration() );
-        _analysis_menu.add( _gsdi_item = new JMenuItem( "GSDI (Generalized Speciation Duplication Inference)" ) );
-        _analysis_menu.add( _gsdir_item = new JMenuItem( "GSDIR (GSDI with re-rooting)" ) );
-        customizeJMenuItem( _gsdi_item );
-        customizeJMenuItem( _gsdir_item );
-        //  _analysis_menu.addSeparator();
-        //  _analysis_menu.add( _lineage_inference = new JMenuItem( INFER_ANCESTOR_TAXONOMIES ) );
-        //  customizeJMenuItem( _lineage_inference );
-        //  _lineage_inference.setToolTipText( "Inference of ancestor taxonomies/lineages" );
+        if ( getSpeciesTree() != null ) {
+            _analysis_menu.add( _gsdi_item = new JMenuItem( "GSDI (Generalized Speciation Duplication Inference)" ) );
+            _analysis_menu.add( _gsdir_item = new JMenuItem( "GSDIR (GSDI with re-rooting)" ) );
+            customizeJMenuItem( _gsdi_item );
+            customizeJMenuItem( _gsdir_item );
+            _analysis_menu.addSeparator();
+        }
+        _analysis_menu.add( _lineage_inference = new JMenuItem( INFER_ANCESTOR_TAXONOMIES ) );
+        customizeJMenuItem( _lineage_inference );
+        _lineage_inference.setToolTipText( "Inference of ancestor taxonomies/lineages" );
         _jmenubar.add( _analysis_menu );
     }
 
index 3b5138b..8ede385 100644 (file)
@@ -63,7 +63,6 @@ import org.forester.analysis.TaxonomyDataManager;
 import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE;\r
 import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;\r
 import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;\r
-import org.forester.archaeopteryx.tools.AncestralTaxonomyInferrer;\r
 import org.forester.archaeopteryx.tools.InferenceManager;\r
 import org.forester.archaeopteryx.tools.PhyloInferenceDialog;\r
 import org.forester.archaeopteryx.tools.PhylogeneticInferenceOptions;\r
@@ -105,13 +104,11 @@ import org.forester.util.ForesterUtil;
 \r
 public final class MainFrameApplication extends MainFrame {\r
 \r
-    static final String                  INFER_ANCESTOR_TAXONOMIES             = "Infer Ancestor Taxonomies";\r
-    static final String                  OBTAIN_DETAILED_TAXONOMIC_INFORMATION = "Obtain Detailed Taxonomic Information";\r
-    private final static int             FRAME_X_SIZE                          = 800;\r
-    private final static int             FRAME_Y_SIZE                          = 800;\r
+    private final static int             FRAME_X_SIZE                    = 800;\r
+    private final static int             FRAME_Y_SIZE                    = 800;\r
     // Filters for the file-open dialog (classes defined in this file)\r
-    private static final long            serialVersionUID                      = -799735726778865234L;\r
-    private static final boolean         PREPROCESS_TREES                      = false;\r
+    private static final long            serialVersionUID                = -799735726778865234L;\r
+    private static final boolean         PREPROCESS_TREES                = false;\r
     private final JFileChooser           _values_filechooser;\r
     private final JFileChooser           _sequences_filechooser;\r
     private final JFileChooser           _open_filechooser;\r
@@ -124,18 +121,18 @@ public final class MainFrameApplication extends MainFrame {
     private ButtonGroup                  _radio_group_1;\r
     private ButtonGroup                  _radio_group_2;\r
     // Others:\r
-    double                               _min_not_collapse                     = Constants.MIN_NOT_COLLAPSE_DEFAULT;\r
-    double                               _min_not_collapse_bl                  = 0.001;\r
+    double                               _min_not_collapse               = Constants.MIN_NOT_COLLAPSE_DEFAULT;\r
+    double                               _min_not_collapse_bl            = 0.001;\r
     // Phylogeny Inference menu\r
     private JMenu                        _inference_menu;\r
     private JMenuItem                    _inference_from_msa_item;\r
     private JMenuItem                    _inference_from_seqs_item;\r
     // Phylogeny Inference\r
-    private PhylogeneticInferenceOptions _phylogenetic_inference_options       = null;\r
-    private Msa                          _msa                                  = null;\r
-    private File                         _msa_file                             = null;\r
-    private List<MolecularSequence>      _seqs                                 = null;\r
-    private File                         _seqs_file                            = null;\r
+    private PhylogeneticInferenceOptions _phylogenetic_inference_options = null;\r
+    private Msa                          _msa                            = null;\r
+    private File                         _msa_file                       = null;\r
+    private List<MolecularSequence>      _seqs                           = null;\r
+    private File                         _seqs_file                      = null;\r
     JMenuItem                            _read_values_jmi;\r
     JMenuItem                            _read_seqs_jmi;\r
 \r
@@ -357,9 +354,9 @@ public final class MainFrameApplication extends MainFrame {
             public void componentResized( final ComponentEvent e ) {\r
                 if ( _mainpanel.getCurrentTreePanel() != null ) {\r
                     _mainpanel.getCurrentTreePanel().calcParametersForPainting( _mainpanel.getCurrentTreePanel()\r
-                                                                                        .getWidth(),\r
+                                                                                .getWidth(),\r
                                                                                 _mainpanel.getCurrentTreePanel()\r
-                                                                                        .getHeight() );\r
+                                                                                .getHeight() );\r
                 }\r
             }\r
         } );\r
@@ -404,16 +401,6 @@ public final class MainFrameApplication extends MainFrame {
             else if ( o == _load_species_tree_item ) {\r
                 readSpeciesTreeFromFile();\r
             }\r
-            else if ( o == _lineage_inference ) {\r
-                if ( isSubtreeDisplayed() ) {\r
-                    JOptionPane.showMessageDialog( this,\r
-                                                   "Subtree is shown.",\r
-                                                   "Cannot infer ancestral taxonomies",\r
-                                                   JOptionPane.ERROR_MESSAGE );\r
-                    return;\r
-                }\r
-                executeLineageInference();\r
-            }\r
             else if ( o == _obtain_detailed_taxonomic_information_jmi ) {\r
                 if ( isSubtreeDisplayed() ) {\r
                     return;\r
@@ -751,8 +738,8 @@ public final class MainFrameApplication extends MainFrame {
                 JOptionPane.showMessageDialog( this,\r
                                                "Table contains " + t.getNumberOfRows() + " rows, but tree contains "\r
                                                        + phy.getNumberOfExternalNodes() + " external nodes",\r
-                                               "Warning",\r
-                                               JOptionPane.WARNING_MESSAGE );\r
+                                                       "Warning",\r
+                                                       JOptionPane.WARNING_MESSAGE );\r
             }\r
             final DescriptiveStatistics stats = new BasicDescriptiveStatistics();\r
             int not_found = 0;\r
@@ -766,10 +753,10 @@ public final class MainFrameApplication extends MainFrame {
                     }\r
                     catch ( final IllegalArgumentException e ) {\r
                         JOptionPane\r
-                                .showMessageDialog( this,\r
-                                                    e.getMessage(),\r
-                                                    "Error Mapping Node Identifiers to Expression Value Identifiers",\r
-                                                    JOptionPane.ERROR_MESSAGE );\r
+                        .showMessageDialog( this,\r
+                                            e.getMessage(),\r
+                                            "Error Mapping Node Identifiers to Expression Value Identifiers",\r
+                                            JOptionPane.ERROR_MESSAGE );\r
                         return;\r
                     }\r
                     if ( row < 0 ) {\r
@@ -787,7 +774,7 @@ public final class MainFrameApplication extends MainFrame {
                         catch ( final NumberFormatException e ) {\r
                             JOptionPane.showMessageDialog( this,\r
                                                            "Could not parse \"" + t.getValueAsString( col, row )\r
-                                                                   + "\" into a decimal value",\r
+                                                           + "\" into a decimal value",\r
                                                            "Issue with Expression Value Table",\r
                                                            JOptionPane.ERROR_MESSAGE );\r
                             return;\r
@@ -798,7 +785,7 @@ public final class MainFrameApplication extends MainFrame {
                     if ( !l.isEmpty() ) {\r
                         if ( node.getNodeData().getProperties() != null ) {\r
                             node.getNodeData().getProperties()\r
-                                    .removePropertiesWithGivenReferencePrefix( PhyloXmlUtil.VECTOR_PROPERTY_REF );\r
+                            .removePropertiesWithGivenReferencePrefix( PhyloXmlUtil.VECTOR_PROPERTY_REF );\r
                         }\r
                         node.getNodeData().setVector( l );\r
                     }\r
@@ -806,7 +793,7 @@ public final class MainFrameApplication extends MainFrame {
             }\r
             if ( not_found > 0 ) {\r
                 JOptionPane.showMessageDialog( this, "Could not fine expression values for " + not_found\r
-                        + " external node(s)", "Warning", JOptionPane.WARNING_MESSAGE );\r
+                                               + " external node(s)", "Warning", JOptionPane.WARNING_MESSAGE );\r
             }\r
             getCurrentTreePanel().setStatisticsForExpressionValues( stats );\r
         }\r
@@ -915,7 +902,7 @@ public final class MainFrameApplication extends MainFrame {
                         }\r
                         if ( nodes.size() > 1 ) {\r
                             JOptionPane.showMessageDialog( this, "Split sequence name \"" + seq_name_split\r
-                                    + "\" is not unique", "Sequence name not unique", JOptionPane.ERROR_MESSAGE );\r
+                                                           + "\" is not unique", "Sequence name not unique", JOptionPane.ERROR_MESSAGE );\r
                             setArrowCursor();\r
                             return;\r
                         }\r
@@ -960,13 +947,13 @@ public final class MainFrameApplication extends MainFrame {
                 }\r
                 else {\r
                     JOptionPane.showMessageDialog( this, "Attached " + attached_counter\r
-                            + " sequences out of a total of " + total_counter + " sequences.\n" + s, attached_counter\r
-                            + " sequences attached", JOptionPane.WARNING_MESSAGE );\r
+                                                   + " sequences out of a total of " + total_counter + " sequences.\n" + s, attached_counter\r
+                                                   + " sequences attached", JOptionPane.WARNING_MESSAGE );\r
                 }\r
             }\r
             else {\r
                 JOptionPane.showMessageDialog( this, "No maching tree node for any of the " + total_counter\r
-                        + " sequences", "Could not attach any sequences", JOptionPane.ERROR_MESSAGE );\r
+                                               + " sequences", "Could not attach any sequences", JOptionPane.ERROR_MESSAGE );\r
             }\r
         }\r
     }\r
@@ -1033,8 +1020,8 @@ public final class MainFrameApplication extends MainFrame {
             }\r
             if ( to_be_removed.size() > 0 ) {\r
                 JOptionPane.showMessageDialog( this, "Collapsed " + to_be_removed.size()\r
-                        + " branches with\nconfidence values below " + getMinNotCollapseConfidenceValue(), "Collapsed "\r
-                        + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
+                                               + " branches with\nconfidence values below " + getMinNotCollapseConfidenceValue(), "Collapsed "\r
+                                                       + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
             }\r
             else {\r
                 JOptionPane.showMessageDialog( this, "No branch collapsed,\nminimum confidence value per branch is "\r
@@ -1160,8 +1147,8 @@ public final class MainFrameApplication extends MainFrame {
             }\r
             if ( to_be_removed.size() > 0 ) {\r
                 JOptionPane.showMessageDialog( this, "Collapsed " + to_be_removed.size()\r
-                        + " branches with\nbranch length values below " + getMinNotCollapseBlValue(), "Collapsed "\r
-                        + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
+                                               + " branches with\nbranch length values below " + getMinNotCollapseBlValue(), "Collapsed "\r
+                                                       + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );\r
             }\r
             else {\r
                 JOptionPane.showMessageDialog( this,\r
@@ -1207,7 +1194,7 @@ public final class MainFrameApplication extends MainFrame {
                 if ( getMsa() != null ) {\r
                     final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getMsa(),\r
                                                                                     getPhylogeneticInferenceOptions()\r
-                                                                                            .copy(), this );\r
+                                                                                    .copy(), this );\r
                     new Thread( inferrer ).start();\r
                 }\r
                 else {\r
@@ -1221,7 +1208,7 @@ public final class MainFrameApplication extends MainFrame {
                 if ( getSeqs() != null ) {\r
                     final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getSeqs(),\r
                                                                                     getPhylogeneticInferenceOptions()\r
-                                                                                            .copy(), this );\r
+                                                                                    .copy(), this );\r
                     new Thread( inferrer ).start();\r
                 }\r
                 else {\r
@@ -1279,17 +1266,17 @@ public final class MainFrameApplication extends MainFrame {
                     }\r
                     JOptionPane.showMessageDialog( this,\r
                                                    "Extracted taxonomic data from " + all + counter\r
-                                                           + " named external nodes:\n" + sb.toString() + failed,\r
+                                                   + " named external nodes:\n" + sb.toString() + failed,\r
                                                    "Taxonomic Data Extraction Completed",\r
                                                    counter_failed > 0 ? JOptionPane.WARNING_MESSAGE\r
                                                            : JOptionPane.INFORMATION_MESSAGE );\r
                 }\r
                 else {\r
                     JOptionPane\r
-                            .showMessageDialog( this,\r
-                                                "Could not extract any taxonomic data.\nMaybe node names are empty\n"\r
-                                                        + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"\r
-                                                        + "or nodes already have taxonomic data?\n",\r
+                    .showMessageDialog( this,\r
+                                        "Could not extract any taxonomic data.\nMaybe node names are empty\n"\r
+                                                + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"\r
+                                                + "or nodes already have taxonomic data?\n",\r
                                                 "No Taxonomic Data Extracted",\r
                                                 JOptionPane.ERROR_MESSAGE );\r
                 }\r
@@ -1327,7 +1314,7 @@ public final class MainFrameApplication extends MainFrame {
             final Phylogeny phy = getCurrentTreePanel().getPhylogeny();\r
             if ( ( phy != null ) && !phy.isEmpty() ) {\r
                 PhylogenyMethods\r
-                        .transferNodeNameToField( phy, PhylogenyMethods.PhylogenyNodeField.SEQUENCE_NAME, false );\r
+                .transferNodeNameToField( phy, PhylogenyMethods.PhylogenyNodeField.SEQUENCE_NAME, false );\r
             }\r
         }\r
     }\r
@@ -1357,7 +1344,7 @@ public final class MainFrameApplication extends MainFrame {
         if ( getMainPanel().getMainFrame() == null ) {\r
             // Must be "E" applet version.\r
             ( ( ArchaeopteryxE ) ( ( MainPanelApplets ) getMainPanel() ).getApplet() )\r
-                    .setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );\r
+            .setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );\r
         }\r
         else {\r
             getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );\r
@@ -1503,7 +1490,7 @@ public final class MainFrameApplication extends MainFrame {
                         try {\r
                             final PhylogenyParser parser = ParserUtils\r
                                     .createParserDependingOnFileType( file, getConfiguration()\r
-                                            .isValidatePhyloXmlAgainstSchema() );\r
+                                                                      .isValidatePhyloXmlAgainstSchema() );\r
                             if ( parser instanceof NexusPhylogeniesParser ) {\r
                                 final NexusPhylogeniesParser nex = ( NexusPhylogeniesParser ) parser;\r
                                 setSpecialOptionsForNexParser( nex );\r
@@ -1554,10 +1541,10 @@ public final class MainFrameApplication extends MainFrame {
                         _mainpanel.getControlPanel().showWhole();\r
                         if ( nhx_or_nexus && one_desc ) {\r
                             JOptionPane\r
-                                    .showMessageDialog( this,\r
-                                                        "One or more trees contain (a) node(s) with one descendant, "\r
-                                                                + ForesterUtil.LINE_SEPARATOR\r
-                                                                + "possibly indicating illegal parentheses within node names.",\r
+                            .showMessageDialog( this,\r
+                                                "One or more trees contain (a) node(s) with one descendant, "\r
+                                                        + ForesterUtil.LINE_SEPARATOR\r
+                                                        + "possibly indicating illegal parentheses within node names.",\r
                                                         "Warning: Possible Error in New Hampshire Formatted Data",\r
                                                         JOptionPane.WARNING_MESSAGE );\r
                         }\r
@@ -1583,7 +1570,7 @@ public final class MainFrameApplication extends MainFrame {
             if ( _open_filechooser_for_species_tree.getFileFilter() == MainFrame.xmlfilter ) {\r
                 try {\r
                     final Phylogeny[] trees = PhylogenyMethods.readPhylogenies( PhyloXmlParser\r
-                            .createPhyloXmlParserXsdValidating(), file );\r
+                                                                                .createPhyloXmlParserXsdValidating(), file );\r
                     t = trees[ 0 ];\r
                 }\r
                 catch ( final Exception e ) {\r
@@ -1605,7 +1592,7 @@ public final class MainFrameApplication extends MainFrame {
             else {\r
                 try {\r
                     final Phylogeny[] trees = PhylogenyMethods.readPhylogenies( PhyloXmlParser\r
-                            .createPhyloXmlParserXsdValidating(), file );\r
+                                                                                .createPhyloXmlParserXsdValidating(), file );\r
                     t = trees[ 0 ];\r
                 }\r
                 catch ( final Exception e ) {\r
@@ -1629,10 +1616,10 @@ public final class MainFrameApplication extends MainFrame {
                         exception = true;\r
                         t = null;\r
                         JOptionPane\r
-                                .showMessageDialog( this,\r
-                                                    "Species tree contains external node(s) without taxonomy information",\r
-                                                    "Species tree not loaded",\r
-                                                    JOptionPane.ERROR_MESSAGE );\r
+                        .showMessageDialog( this,\r
+                                            "Species tree contains external node(s) without taxonomy information",\r
+                                            "Species tree not loaded",\r
+                                            JOptionPane.ERROR_MESSAGE );\r
                         break;\r
                     }\r
                     else {\r
@@ -1643,8 +1630,8 @@ public final class MainFrameApplication extends MainFrame {
                                                            "Taxonomy ["\r
                                                                    + node.getNodeData().getTaxonomy().asSimpleText()\r
                                                                    + "] is not unique in species tree",\r
-                                                           "Species tree not loaded",\r
-                                                           JOptionPane.ERROR_MESSAGE );\r
+                                                                   "Species tree not loaded",\r
+                                                                   JOptionPane.ERROR_MESSAGE );\r
                             break;\r
                         }\r
                         else {\r
@@ -1721,7 +1708,7 @@ public final class MainFrameApplication extends MainFrame {
         _file_jmenu.addSeparator();\r
         final WebservicesManager webservices_manager = WebservicesManager.getInstance();\r
         _load_phylogeny_from_webservice_menu_items = new JMenuItem[ webservices_manager\r
-                .getAvailablePhylogeniesWebserviceClients().size() ];\r
+                                                                    .getAvailablePhylogeniesWebserviceClients().size() ];\r
         for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {\r
             final PhylogeniesWebserviceClient client = webservices_manager.getAvailablePhylogeniesWebserviceClient( i );\r
             _load_phylogeny_from_webservice_menu_items[ i ] = new JMenuItem( client.getMenuName() );\r
@@ -1760,7 +1747,7 @@ public final class MainFrameApplication extends MainFrame {
         _file_jmenu.add( _exit_item = new JMenuItem( "Exit" ) );\r
         customizeJMenuItem( _open_item );\r
         _open_item\r
-                .setFont( new Font( _open_item.getFont().getFontName(), Font.BOLD, _open_item.getFont().getSize() + 4 ) );\r
+        .setFont( new Font( _open_item.getFont().getFontName(), Font.BOLD, _open_item.getFont().getSize() + 4 ) );\r
         customizeJMenuItem( _open_url_item );\r
         for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {\r
             customizeJMenuItem( _load_phylogeny_from_webservice_menu_items[ i ] );\r
@@ -1791,9 +1778,9 @@ public final class MainFrameApplication extends MainFrame {
                 MainFrame.setOvPlacementColorChooseMenuItem( _overview_placment_mi, getOptions() );\r
                 MainFrame.setTextColorChooseMenuItem( _switch_colors_mi, getCurrentTreePanel() );\r
                 MainFrame\r
-                        .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );\r
+                .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );\r
                 MainFrame.setTextForFontChooserMenuItem( _choose_font_mi, MainFrame\r
-                        .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );\r
+                                                         .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );\r
                 MainFrame.setTextForGraphicsSizeChooserMenuItem( _print_size_mi, getOptions() );\r
                 MainFrame.setTextForPdfLineWidthChooserMenuItem( _choose_pdf_width_mi, getOptions() );\r
                 MainFrame.setCycleNodeFillMenuItem( _cycle_node_fill_mi, getOptions() );\r
@@ -1811,7 +1798,7 @@ public final class MainFrameApplication extends MainFrame {
         } );\r
         _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( DISPLAY_SUBHEADER ), getConfiguration() ) );\r
         _options_jmenu\r
-                .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );\r
+        .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );\r
         _options_jmenu.add( _uniform_cladograms_rbmi = new JRadioButtonMenuItem( MainFrame.UNIFORM_CLADOGRAMS_LABEL ) );\r
         _options_jmenu.add( _non_lined_up_cladograms_rbmi = new JRadioButtonMenuItem( NON_LINED_UP_CLADOGRAMS_LABEL ) );\r
         _radio_group_1 = new ButtonGroup();\r
@@ -1821,11 +1808,11 @@ public final class MainFrameApplication extends MainFrame {
         _options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( SHOW_OVERVIEW_LABEL ) );\r
         _options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( DISPLAY_SCALE_LABEL ) );\r
         _options_jmenu\r
-                .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );\r
+        .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );\r
         _options_jmenu\r
-                .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );\r
+        .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );\r
         _options_jmenu\r
-                .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );\r
+        .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );\r
         _options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );\r
         if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {\r
             _options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );\r
@@ -1863,33 +1850,33 @@ public final class MainFrameApplication extends MainFrame {
         _options_jmenu.add( _antialias_print_cbmi = new JCheckBoxMenuItem( "Antialias" ) );\r
         _options_jmenu.add( _print_black_and_white_cbmi = new JCheckBoxMenuItem( "Export in Black and White" ) );\r
         _options_jmenu\r
-                .add( _print_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PDF export and Printing" ) );\r
+        .add( _print_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PDF export and Printing" ) );\r
         _options_jmenu\r
-                .add( _graphics_export_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PNG, JPG, and GIF export" ) );\r
+        .add( _graphics_export_using_actual_size_cbmi = new JCheckBoxMenuItem( "Use Current Image Size for PNG, JPG, and GIF export" ) );\r
         _options_jmenu\r
-                .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );\r
+        .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );\r
         _options_jmenu.add( _print_size_mi = new JMenuItem( "" ) );\r
         _options_jmenu.add( _choose_pdf_width_mi = new JMenuItem( "" ) );\r
         _options_jmenu.addSeparator();\r
         _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/NHX/Nexus Input:" ), getConfiguration() ) );\r
         _options_jmenu\r
-                .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );\r
+        .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );\r
         _options_jmenu.add( _replace_underscores_cbmi = new JCheckBoxMenuItem( "Replace Underscores with Spaces" ) );\r
         _options_jmenu\r
-                .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );\r
+        .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );\r
         _options_jmenu.add( _extract_taxonomy_no_rbmi = new JRadioButtonMenuItem( "No Taxonomy Extraction" ) );\r
         _options_jmenu\r
-                .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );\r
+        .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );\r
         _options_jmenu\r
-                .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );\r
+        .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );\r
         _options_jmenu\r
-                .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );\r
+        .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );\r
         _extract_taxonomy_pfam_strict_rbmi\r
-                .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );\r
+        .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );\r
         _extract_taxonomy_pfam_relaxed_rbmi\r
-                .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );\r
+        .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );\r
         _extract_taxonomy_agressive_rbmi\r
-                .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );\r
+        .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );\r
         _radio_group_2 = new ButtonGroup();\r
         _radio_group_2.add( _extract_taxonomy_no_rbmi );\r
         _radio_group_2.add( _extract_taxonomy_pfam_strict_rbmi );\r
@@ -1897,11 +1884,11 @@ public final class MainFrameApplication extends MainFrame {
         _radio_group_2.add( _extract_taxonomy_agressive_rbmi );\r
         _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/Nexus Output:" ), getConfiguration() ) );\r
         _options_jmenu\r
-                .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );\r
+        .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );\r
         _use_brackets_for_conf_in_nh_export_cbmi\r
-                .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );\r
+        .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );\r
         _options_jmenu\r
-                .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );\r
+        .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );\r
         customizeJMenuItem( _choose_font_mi );\r
         customizeJMenuItem( _choose_minimal_confidence_mi );\r
         customizeJMenuItem( _switch_colors_mi );\r
@@ -1909,11 +1896,11 @@ public final class MainFrameApplication extends MainFrame {
         customizeJMenuItem( _choose_pdf_width_mi );\r
         customizeJMenuItem( _overview_placment_mi );\r
         customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions()\r
-                .isShowDefaultNodeShapesExternal() );\r
+                                   .isShowDefaultNodeShapesExternal() );\r
         customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions()\r
-                .isShowDefaultNodeShapesInternal() );\r
+                                   .isShowDefaultNodeShapesInternal() );\r
         customizeCheckBoxMenuItem( _show_default_node_shapes_for_marked_cbmi, getOptions()\r
-                .isShowDefaultNodeShapesForMarkedNodes() );\r
+                                   .isShowDefaultNodeShapesForMarkedNodes() );\r
         customizeJMenuItem( _cycle_node_shape_mi );\r
         customizeJMenuItem( _cycle_node_fill_mi );\r
         customizeJMenuItem( _choose_node_size_mi );\r
@@ -1939,7 +1926,7 @@ public final class MainFrameApplication extends MainFrame {
         customizeCheckBoxMenuItem( _antialias_print_cbmi, getOptions().isAntialiasPrint() );\r
         customizeCheckBoxMenuItem( _print_black_and_white_cbmi, getOptions().isPrintBlackAndWhite() );\r
         customizeCheckBoxMenuItem( _internal_number_are_confidence_for_nh_parsing_cbmi, getOptions()\r
-                .isInternalNumberAreConfidenceForNhParsing() );\r
+                                   .isInternalNumberAreConfidenceForNhParsing() );\r
         customizeRadioButtonMenuItem( _extract_taxonomy_no_rbmi,\r
                                       getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.NO );\r
         customizeRadioButtonMenuItem( _extract_taxonomy_pfam_strict_rbmi,\r
@@ -1950,19 +1937,19 @@ public final class MainFrameApplication extends MainFrame {
                                       getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.AGGRESSIVE );\r
         customizeCheckBoxMenuItem( _replace_underscores_cbmi, getOptions().isReplaceUnderscoresInNhParsing() );\r
         customizeCheckBoxMenuItem( _allow_errors_in_distance_to_parent_cbmi, getOptions()\r
-                .isReplaceUnderscoresInNhParsing() );\r
+                                   .isReplaceUnderscoresInNhParsing() );\r
         customizeCheckBoxMenuItem( _search_with_regex_cbmi, getOptions().isSearchWithRegex() );\r
         customizeCheckBoxMenuItem( _search_whole_words_only_cbmi, getOptions().isMatchWholeTermsOnly() );\r
         customizeCheckBoxMenuItem( _inverse_search_result_cbmi, getOptions().isInverseSearchResult() );\r
         customizeCheckBoxMenuItem( _graphics_export_visible_only_cbmi, getOptions().isGraphicsExportVisibleOnly() );\r
         customizeCheckBoxMenuItem( _print_using_actual_size_cbmi, getOptions().isPrintUsingActualSize() );\r
         customizeCheckBoxMenuItem( _graphics_export_using_actual_size_cbmi, getOptions()\r
-                .isGraphicsExportUsingActualSize() );\r
+                                   .isGraphicsExportUsingActualSize() );\r
         customizeCheckBoxMenuItem( _show_confidence_stddev_cbmi, getOptions().isShowConfidenceStddev() );\r
         customizeCheckBoxMenuItem( _use_brackets_for_conf_in_nh_export_cbmi, getOptions()\r
-                .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );\r
+                                   .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );\r
         customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi, getOptions()\r
-                .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );\r
+                                   .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );\r
         customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData() );\r
         customizeCheckBoxMenuItem( _right_line_up_domains_cbmi, getOptions().isRightLineUpDomains() );\r
         _jmenubar.add( _options_jmenu );\r
@@ -1978,11 +1965,11 @@ public final class MainFrameApplication extends MainFrame {
             _inference_menu.add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences..." ) );\r
             customizeJMenuItem( _inference_from_seqs_item );\r
             _inference_from_seqs_item\r
-                    .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );\r
+            .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );\r
         }\r
         else {\r
             _inference_menu\r
-                    .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );\r
+            .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );\r
             customizeJMenuItem( _inference_from_seqs_item );\r
             _inference_from_seqs_item.setEnabled( false );\r
         }\r
@@ -2001,7 +1988,7 @@ public final class MainFrameApplication extends MainFrame {
         _tools_menu.addSeparator();\r
         _tools_menu.add( _remove_visual_styles_item = new JMenuItem( "Delete All Visual Styles From Nodes" ) );\r
         _remove_visual_styles_item\r
-                .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny" );\r
+        .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny" );\r
         customizeJMenuItem( _remove_visual_styles_item );\r
         _tools_menu.add( _remove_branch_color_item = new JMenuItem( "Delete All Colors From Branches" ) );\r
         _remove_branch_color_item.setToolTipText( "To remove all branch color values from the current phylogeny" );\r
@@ -2024,25 +2011,25 @@ public final class MainFrameApplication extends MainFrame {
         customizeJMenuItem( _collapse_species_specific_subtrees );\r
         _collapse_species_specific_subtrees.setToolTipText( "To (reversibly) collapse species-specific subtrees" );\r
         _tools_menu\r
-                .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );\r
+        .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );\r
         customizeJMenuItem( _collapse_below_threshold );\r
         _collapse_below_threshold\r
-                .setToolTipText( "To (permanently) collapse branches with confidence values below a threshold into multifurcations (in the case of multiple confidences per branch: without at least one confidence value above a threshold)" );\r
+        .setToolTipText( "To (permanently) collapse branches with confidence values below a threshold into multifurcations (in the case of multiple confidences per branch: without at least one confidence value above a threshold)" );\r
         //\r
         _tools_menu\r
-                .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );\r
+        .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );\r
         customizeJMenuItem( _collapse_below_branch_length );\r
         _collapse_below_branch_length\r
-                .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );\r
+        .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );\r
         //\r
         _tools_menu.addSeparator();\r
         _tools_menu\r
-                .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );\r
+        .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );\r
         customizeJMenuItem( _extract_tax_code_from_node_names_jmi );\r
         _extract_tax_code_from_node_names_jmi\r
-                .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', Uniprot/NCBI identifiers form of 'xyz_6239', or scientific names form of 'xyz_Caenorhabditis_elegans'" );\r
+        .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', Uniprot/NCBI identifiers form of 'xyz_6239', or scientific names form of 'xyz_Caenorhabditis_elegans'" );\r
         _tools_menu\r
-                .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );\r
+        .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );\r
         customizeJMenuItem( _move_node_names_to_tax_sn_jmi );\r
         _move_node_names_to_tax_sn_jmi.setToolTipText( "To interpret node names as taxonomic scientific names" );\r
         _tools_menu.add( _move_node_names_to_seq_names_jmi = new JMenuItem( "Transfer Node Names to Sequence Names" ) );\r
@@ -2053,15 +2040,15 @@ public final class MainFrameApplication extends MainFrame {
         customizeJMenuItem( _obtain_seq_information_jmi );\r
         _obtain_seq_information_jmi.setToolTipText( "To add additional sequence information" );\r
         _tools_menu\r
-                .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );\r
+        .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );\r
         customizeJMenuItem( _obtain_detailed_taxonomic_information_jmi );\r
         _obtain_detailed_taxonomic_information_jmi\r
-                .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );\r
+        .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );\r
         _tools_menu\r
-                .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );\r
+        .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );\r
         customizeJMenuItem( _obtain_detailed_taxonomic_information_deleting_jmi );\r
         _obtain_detailed_taxonomic_information_deleting_jmi\r
-                .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );\r
+        .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );\r
         _tools_menu.addSeparator();\r
         _tools_menu.add( _read_values_jmi = new JMenuItem( "Attach Vector/Expression Values" ) );\r
         customizeJMenuItem( _read_values_jmi );\r
@@ -2070,7 +2057,7 @@ public final class MainFrameApplication extends MainFrame {
         _tools_menu.add( _read_seqs_jmi = new JMenuItem( "Attach Molecular Sequences" ) );\r
         customizeJMenuItem( _read_seqs_jmi );\r
         _read_seqs_jmi\r
-                .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );\r
+        .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );\r
         _jmenubar.add( _tools_menu );\r
     }\r
 \r
@@ -2088,24 +2075,6 @@ public final class MainFrameApplication extends MainFrame {
         exit();\r
     }\r
 \r
-    void executeLineageInference() {\r
-        if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) {\r
-            return;\r
-        }\r
-        if ( !_mainpanel.getCurrentPhylogeny().isRooted() ) {\r
-            JOptionPane.showMessageDialog( this,\r
-                                           "Phylogeny is not rooted.",\r
-                                           "Cannot infer ancestral taxonomies",\r
-                                           JOptionPane.ERROR_MESSAGE );\r
-            return;\r
-        }\r
-        final AncestralTaxonomyInferrer inferrer = new AncestralTaxonomyInferrer( this,\r
-                                                                                  _mainpanel.getCurrentTreePanel(),\r
-                                                                                  _mainpanel.getCurrentPhylogeny()\r
-                                                                                          .copy() );\r
-        new Thread( inferrer ).start();\r
-    }\r
-\r
     void exit() {\r
         removeAllTextFrames();\r
         _mainpanel.terminate();\r
@@ -2133,7 +2102,7 @@ public final class MainFrameApplication extends MainFrame {
                 }\r
                 else {\r
                     parser = ParserUtils.createParserDependingOnUrlContents( url, getConfiguration()\r
-                            .isValidatePhyloXmlAgainstSchema() );\r
+                                                                             .isValidatePhyloXmlAgainstSchema() );\r
                 }\r
                 if ( parser instanceof NexusPhylogeniesParser ) {\r
                     nhx_or_nexus = true;\r
@@ -2160,8 +2129,8 @@ public final class MainFrameApplication extends MainFrame {
                 JOptionPane.showMessageDialog( this,\r
                                                "Could not read from " + url + "\n"\r
                                                        + ForesterUtil.wordWrap( e.getLocalizedMessage(), 80 ),\r
-                                               "Failed to read URL",\r
-                                               JOptionPane.ERROR_MESSAGE );\r
+                                                       "Failed to read URL",\r
+                                                       JOptionPane.ERROR_MESSAGE );\r
             }\r
             catch ( final Exception e ) {\r
                 JOptionPane.showMessageDialog( this,\r
@@ -2233,12 +2202,12 @@ public final class MainFrameApplication extends MainFrame {
     static void warnIfNotPhyloXmlValidation( final Configuration c ) {\r
         if ( !c.isValidatePhyloXmlAgainstSchema() ) {\r
             JOptionPane\r
-                    .showMessageDialog( null,\r
-                                        ForesterUtil\r
-                                                .wordWrap( "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]",\r
-                                                           80 ),\r
-                                        "Warning",\r
-                                        JOptionPane.WARNING_MESSAGE );\r
+            .showMessageDialog( null,\r
+                                ForesterUtil\r
+                                .wordWrap( "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]",\r
+                                           80 ),\r
+                                           "Warning",\r
+                                           JOptionPane.WARNING_MESSAGE );\r
         }\r
     }\r
 } // MainFrameApplication.\r
index 25ed68a..fa159b4 100644 (file)
@@ -31,6 +31,7 @@ import javax.swing.JOptionPane;
 
 import org.forester.analysis.AncestralTaxonomyInference;
 import org.forester.analysis.AncestralTaxonomyInferenceException;
+import org.forester.archaeopteryx.MainFrame;
 import org.forester.archaeopteryx.MainFrameApplication;
 import org.forester.archaeopteryx.TreePanel;
 import org.forester.phylogeny.Phylogeny;
@@ -39,10 +40,10 @@ import org.forester.ws.seqdb.SequenceDbWsTools;
 public class AncestralTaxonomyInferrer extends RunnableProcess {
 
     private final Phylogeny            _phy;
-    private final MainFrameApplication _mf;
+    private final MainFrame _mf;
     private final TreePanel            _treepanel;
 
-    public AncestralTaxonomyInferrer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
+    public AncestralTaxonomyInferrer( final MainFrame mf, final TreePanel treepanel, final Phylogeny phy ) {
         _phy = phy;
         _mf = mf;
         _treepanel = treepanel;