inprogress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / MainFrameApplication.java
index ff467b8..b50cbf2 100644 (file)
@@ -22,7 +22,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.archaeopteryx;
 
@@ -302,7 +302,6 @@ public final class MainFrameApplication extends MainFrame {
         _save_filechooser.setCurrentDirectory( new File( "." ) );
         _save_filechooser.setMultiSelectionEnabled( false );
         _save_filechooser.setFileFilter( MainFrameApplication.xmlfilter );
-        _save_filechooser.addChoosableFileFilter( MainFrameApplication.nhxfilter );
         _save_filechooser.addChoosableFileFilter( MainFrameApplication.nhfilter );
         _save_filechooser.addChoosableFileFilter( MainFrameApplication.nexusfilter );
         _save_filechooser.addChoosableFileFilter( _save_filechooser.getAcceptAllFileFilter() );
@@ -963,7 +962,10 @@ public final class MainFrameApplication extends MainFrame {
         _options_jmenu
                 .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) );
         _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( SHOW_CONF_STDDEV_LABEL ) );
-        _options_jmenu.add( _show_default_node_shapes_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL ) );
+        _options_jmenu
+                .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );
+        _options_jmenu
+                .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );
         _options_jmenu
                 .add( _taxonomy_colorize_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.TAXONOMY_COLORIZE_NODE_SHAPES_LABEL ) );
         _options_jmenu.add( _cycle_node_shape_mi = new JMenuItem( MainFrame.CYCLE_NODE_SHAPE_LABEL ) );
@@ -1034,7 +1036,10 @@ public final class MainFrameApplication extends MainFrame {
         customizeJMenuItem( _print_size_mi );
         customizeJMenuItem( _choose_pdf_width_mi );
         customizeJMenuItem( _overview_placment_mi );
-        customizeCheckBoxMenuItem( _show_default_node_shapes_cbmi, getOptions().isShowDefaultNodeShapes() );
+        customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions()
+                .isShowDefaultNodeShapesExternal() );
+        customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions()
+                .isShowDefaultNodeShapesInternal() );
         customizeCheckBoxMenuItem( _taxonomy_colorize_node_shapes_cbmi, getOptions().isTaxonomyColorizeNodeShapes() );
         customizeJMenuItem( _cycle_node_shape_mi );
         customizeJMenuItem( _cycle_node_fill_mi );
@@ -1130,10 +1135,10 @@ public final class MainFrameApplication extends MainFrame {
                 .setToolTipText( "To 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)" );
         _tools_menu.addSeparator();
         _tools_menu
-                .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Codes or Ids from Node Names" ) );
+                .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );
         customizeJMenuItem( _extract_tax_code_from_node_names_jmi );
         _extract_tax_code_from_node_names_jmi
-                .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', or Uniprot/NCBI identifiers from nodes names in the form of 'xyz_6239'" );
+                .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'" );
         _tools_menu
                 .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );
         customizeJMenuItem( _move_node_names_to_tax_sn_jmi );
@@ -1923,8 +1928,8 @@ public final class MainFrameApplication extends MainFrame {
                 else {
                     JOptionPane
                             .showMessageDialog( this,
-                                                "Could not extract any taxonomic data. Maybe node names are empty\n"
-                                                        + "or not in the forms \"XYZ_CAEEL\", \"XYZ_CAEEL/12-394\", or \"XYZ_6239\",\n"
+                                                "Could not extract any taxonomic data.\nMaybe node names are empty\n"
+                                                        + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"
                                                         + "or nodes already have taxonomic data?\n",
                                                 "No Taxonomic Data Extracted",
                                                 JOptionPane.ERROR_MESSAGE );
@@ -2474,18 +2479,6 @@ public final class MainFrameApplication extends MainFrame {
         return exception;
     }
 
-    private boolean writeAsNHX( final Phylogeny t, boolean exception, final File file ) {
-        try {
-            final PhylogenyWriter writer = new PhylogenyWriter();
-            writer.toNewHampshireX( t, file );
-        }
-        catch ( final Exception e ) {
-            exception = true;
-            exceptionOccuredDuringSaveAs( e );
-        }
-        return exception;
-    }
-
     private boolean writeAsPhyloXml( final Phylogeny t, boolean exception, final File file ) {
         try {
             final PhylogenyWriter writer = new PhylogenyWriter();
@@ -2560,9 +2553,6 @@ public final class MainFrameApplication extends MainFrame {
             if ( _save_filechooser.getFileFilter() == MainFrameApplication.nhfilter ) {
                 exception = writeAsNewHampshire( t, exception, file );
             }
-            else if ( _save_filechooser.getFileFilter() == MainFrameApplication.nhxfilter ) {
-                exception = writeAsNHX( t, exception, file );
-            }
             else if ( _save_filechooser.getFileFilter() == MainFrameApplication.xmlfilter ) {
                 exception = writeAsPhyloXml( t, exception, file );
             }
@@ -2576,9 +2566,6 @@ public final class MainFrameApplication extends MainFrame {
                         || file_name.endsWith( ".tree" ) ) {
                     exception = writeAsNewHampshire( t, exception, file );
                 }
-                else if ( file_name.endsWith( ".nhx" ) ) {
-                    exception = writeAsNHX( t, exception, file );
-                }
                 else if ( file_name.endsWith( ".nex" ) || file_name.endsWith( ".nexus" ) ) {
                     exception = writeAsNexus( t, exception, file );
                 }
@@ -2816,7 +2803,7 @@ class NHXFilter extends FileFilter {
 
     @Override
     public String getDescription() {
-        return "NHX files (*.nhx)";
+        return "NHX files (*.nhx) [deprecated]";
     }
 }