+ nhx.setAllowErrorsInDistanceToParent( getOptions().isAllowErrorsInDistanceToParent() );
+ nhx.setParseBeastStyleExtendedTags( getOptions().isParseBeastStyleExtendedNexusTags() );
+ }
+
+ 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)" ) );
+ _analysis_menu.add( _load_species_tree_item = new JMenuItem( "Load Species Tree..." ) );
+ customizeJMenuItem( _gsdi_item );
+ customizeJMenuItem( _gsdir_item );
+ customizeJMenuItem( _load_species_tree_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 );
+ }
+
+ @Override
+ void buildFileMenu() {
+ _file_jmenu = MainFrame.createMenu( "File", getConfiguration() );
+ _file_jmenu.add( _open_item = new JMenuItem( "Read Tree from File..." ) );
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _open_url_item = new JMenuItem( "Read Tree from URL/Webservice..." ) );
+ _file_jmenu.addSeparator();
+ final WebservicesManager webservices_manager = WebservicesManager.getInstance();
+ _load_phylogeny_from_webservice_menu_items = new JMenuItem[ webservices_manager
+ .getAvailablePhylogeniesWebserviceClients().size() ];
+ for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {
+ final PhylogeniesWebserviceClient client = webservices_manager.getAvailablePhylogeniesWebserviceClient( i );
+ _load_phylogeny_from_webservice_menu_items[ i ] = new JMenuItem( client.getMenuName() );
+ _file_jmenu.add( _load_phylogeny_from_webservice_menu_items[ i ] );
+ }
+ if ( getConfiguration().isEditable() ) {
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _new_item = new JMenuItem( "New" ) );
+ _new_item.setToolTipText( "to create a new tree with one node, as source for manual tree construction" );
+ }
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _save_item = new JMenuItem( "Save Tree As..." ) );
+ _file_jmenu.add( _save_all_item = new JMenuItem( "Save All Trees As..." ) );
+ _save_all_item.setToolTipText( "Write all phylogenies to one file." );
+ _save_all_item.setEnabled( false );
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _write_to_pdf_item = new JMenuItem( "Export to PDF file ..." ) );
+ if ( AptxUtil.canWriteFormat( "tif" ) || AptxUtil.canWriteFormat( "tiff" )
+ || AptxUtil.canWriteFormat( "TIF" ) ) {
+ _file_jmenu.add( _write_to_tif_item = new JMenuItem( "Export to TIFF file..." ) );
+ }
+ _file_jmenu.add( _write_to_png_item = new JMenuItem( "Export to PNG file..." ) );
+ _file_jmenu.add( _write_to_jpg_item = new JMenuItem( "Export to JPG file..." ) );
+ if ( AptxUtil.canWriteFormat( "gif" ) ) {
+ _file_jmenu.add( _write_to_gif_item = new JMenuItem( "Export to GIF file..." ) );
+ }
+ if ( AptxUtil.canWriteFormat( "bmp" ) ) {
+ _file_jmenu.add( _write_to_bmp_item = new JMenuItem( "Export to BMP file..." ) );
+ }
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _print_item = new JMenuItem( "Print..." ) );
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _close_item = new JMenuItem( "Close Tab" ) );
+ _close_item.setToolTipText( "To close the current pane." );
+ _close_item.setEnabled( true );
+ _file_jmenu.addSeparator();
+ _file_jmenu.add( _exit_item = new JMenuItem( "Exit" ) );
+ customizeJMenuItem( _open_item );
+ _open_item.setFont( new Font( _open_item.getFont().getFontName(),
+ Font.BOLD,
+ _open_item.getFont().getSize() + 4 ) );
+ customizeJMenuItem( _open_url_item );
+ for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {
+ customizeJMenuItem( _load_phylogeny_from_webservice_menu_items[ i ] );
+ }
+ customizeJMenuItem( _save_item );
+ if ( getConfiguration().isEditable() ) {
+ customizeJMenuItem( _new_item );
+ }
+ customizeJMenuItem( _close_item );
+ customizeJMenuItem( _save_all_item );
+ customizeJMenuItem( _write_to_pdf_item );
+ customizeJMenuItem( _write_to_png_item );
+ customizeJMenuItem( _write_to_jpg_item );
+ customizeJMenuItem( _write_to_gif_item );
+ customizeJMenuItem( _write_to_tif_item );
+ customizeJMenuItem( _write_to_bmp_item );
+ customizeJMenuItem( _print_item );
+ customizeJMenuItem( _exit_item );
+ _jmenubar.add( _file_jmenu );
+ }
+
+ void buildOptionsMenu() {
+ _options_jmenu = MainFrame.createMenu( OPTIONS_HEADER, getConfiguration() );
+ _options_jmenu.addChangeListener( new ChangeListener() {
+
+ @Override
+ public void stateChanged( final ChangeEvent e ) {
+ MainFrame.setOvPlacementColorChooseMenuItem( _overview_placment_mi, getOptions() );
+ MainFrame.setTextColorChooseMenuItem( _switch_colors_mi, getCurrentTreePanel() );
+ MainFrame.setTextMinSupportMenuItem( _choose_minimal_confidence_mi,
+ getOptions(),
+ getCurrentTreePanel() );
+ MainFrame.setTextForFontChooserMenuItem( _choose_font_mi,
+ MainFrame.createCurrentFontDesc( getMainPanel()
+ .getTreeFontSet() ) );
+ // MainFrame.setTextForGraphicsSizeChooserMenuItem( _print_size_mi, getOptions() );
+ MainFrame.setTextForPdfLineWidthChooserMenuItem( _choose_pdf_width_mi, getOptions() );
+ MainFrame.setCycleNodeFillMenuItem( _cycle_node_fill_mi, getOptions() );
+ MainFrame.setCycleNodeShapeMenuItem( _cycle_node_shape_mi, getOptions() );
+ MainFrame.setCycleDataReturnMenuItem( _cycle_data_return, getOptions() );
+ MainFrame.setTextNodeSizeMenuItem( _choose_node_size_mi, getOptions() );
+ try {
+ getMainPanel().getControlPanel().setVisibilityOfDomainStrucureCB();
+ getMainPanel().getControlPanel().setVisibilityOfX();
+ }
+ catch ( final Exception ignore ) {
+ // do nothing, not important.
+ }
+ }
+ } );
+ _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( DISPLAY_SUBHEADER ), getConfiguration() ) );
+ _options_jmenu
+ .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );
+ _options_jmenu.add( _non_lined_up_cladograms_rbmi = new JRadioButtonMenuItem( NON_LINED_UP_CLADOGRAMS_LABEL ) );
+ _radio_group_1 = new ButtonGroup();
+ _radio_group_1.add( _ext_node_dependent_cladogram_rbmi );
+ _radio_group_1.add( _non_lined_up_cladograms_rbmi );
+ _options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( SHOW_OVERVIEW_LABEL ) );
+ _options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( DISPLAY_SCALE_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( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );
+
+ _options_jmenu
+ .add( _collapsed_with_average_height_cbmi = new JCheckBoxMenuItem( "Proportional Height of Collapsed Subtrees" ) );
+
+
+ _options_jmenu
+ .add( _show_abbreviated_labels_for_collapsed_nodes_cbmi = new JCheckBoxMenuItem( "Add Abbreviated Labels to Collapsed Subtrees" ) );
+
+
+
+ _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 ) );
+ _options_jmenu.add( _show_domain_labels = new JCheckBoxMenuItem( MainFrame.SHOW_DOMAIN_LABELS_LABEL ) );
+ }
+ _options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( SHOW_ANN_REF_SOURCE_LABEL ) );
+ _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( SHOW_CONF_STDDEV_LABEL ) );
+ _options_jmenu.add( _color_by_taxonomic_group_cbmi = new JCheckBoxMenuItem( COLOR_BY_TAXONOMIC_GROUP ) );
+ _options_jmenu.add( _color_labels_same_as_parent_branch = new JCheckBoxMenuItem( COLOR_LABELS_LABEL ) );
+ _color_labels_same_as_parent_branch.setToolTipText( MainFrame.COLOR_LABELS_TIP );
+ _options_jmenu.add( _abbreviate_scientific_names = new JCheckBoxMenuItem( ABBREV_SN_LABEL ) );
+ _options_jmenu.add( _label_direction_cbmi = new JCheckBoxMenuItem( LABEL_DIRECTION_LABEL ) );
+ _label_direction_cbmi.setToolTipText( LABEL_DIRECTION_TIP );
+ _options_jmenu.add( _screen_antialias_cbmi = new JCheckBoxMenuItem( SCREEN_ANTIALIAS_LABEL ) );
+ _options_jmenu.add( _background_gradient_cbmi = new JCheckBoxMenuItem( BG_GRAD_LABEL ) );
+ _options_jmenu.add( _cycle_node_shape_mi = new JMenuItem( MainFrame.CYCLE_NODE_SHAPE_LABEL ) );
+ _options_jmenu.add( _cycle_node_fill_mi = new JMenuItem( MainFrame.CYCLE_NODE_FILL_LABEL ) );
+ _options_jmenu.add( _choose_node_size_mi = new JMenuItem( MainFrame.CHOOSE_NODE_SIZE_LABEL ) );
+ _options_jmenu.add( _choose_minimal_confidence_mi = new JMenuItem( "" ) );
+ _options_jmenu.add( _overview_placment_mi = new JMenuItem( "" ) );
+ _options_jmenu.add( _switch_colors_mi = new JMenuItem( "" ) );
+ _options_jmenu.add( _choose_font_mi = new JMenuItem( "" ) );
+ _options_jmenu.addSeparator();
+ _options_jmenu.add( _cycle_data_return = new JMenuItem( "Cycle Data Return" ) );
+ _options_jmenu.addSeparator();
+ _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( SEARCH_SUBHEADER ), getConfiguration() ) );
+ _options_jmenu.add( _search_case_senstive_cbmi = new JCheckBoxMenuItem( SEARCH_CASE_SENSITIVE_LABEL ) );
+ _options_jmenu.add( _search_whole_words_only_cbmi = new JCheckBoxMenuItem( 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( INVERSE_SEARCH_RESULT_LABEL ) );
+ _options_jmenu
+ .add( _color_all_found_nodes_when_coloring_subtree_cbmi = new JCheckBoxMenuItem( "Colorize All Found Nodes When Colorizing Subtree(s)" ) );
+ _options_jmenu.addSeparator();
+ _options_jmenu
+ .add( customizeMenuItemAsLabel( new JMenuItem( "Graphics Export & Printing:" ), getConfiguration() ) );
+ _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( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );
+ _options_jmenu.add( _choose_pdf_width_mi = new JMenuItem( "" ) );
+ _options_jmenu.addSeparator();
+ _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/NHX/Nexus Read:" ), getConfiguration() ) );
+ _options_jmenu
+ .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );
+ _options_jmenu.add( _replace_underscores_cbmi = new JCheckBoxMenuItem( "Replace Underscores with Spaces" ) );
+ _options_jmenu
+ .add( _parse_beast_style_extended_nexus_tags_cbmi = new JCheckBoxMenuItem( "Parse BEAST-style extended Newick/Nexus tags" ) );
+ _parse_beast_style_extended_nexus_tags_cbmi
+ .setToolTipText( "to parse elements in the form of \"[&!color=#800080]\" in Newick/Nexus formatted trees" );
+ _options_jmenu
+ .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );
+ _options_jmenu.add( _extract_taxonomy_no_rbmi = new JRadioButtonMenuItem( "No Taxonomy Extraction" ) );
+ _options_jmenu
+ .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );
+ _options_jmenu
+ .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );
+ _options_jmenu
+ .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );
+ _extract_taxonomy_pfam_strict_rbmi
+ .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );
+ _extract_taxonomy_pfam_relaxed_rbmi
+ .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );
+ _extract_taxonomy_agressive_rbmi
+ .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\"" );
+ _radio_group_2 = new ButtonGroup();
+ _radio_group_2.add( _extract_taxonomy_no_rbmi );
+ _radio_group_2.add( _extract_taxonomy_pfam_strict_rbmi );
+ _radio_group_2.add( _extract_taxonomy_pfam_relaxed_rbmi );
+ _radio_group_2.add( _extract_taxonomy_agressive_rbmi );
+ _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/Nexus Save:" ), getConfiguration() ) );
+ _options_jmenu
+ .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );
+ _use_brackets_for_conf_in_nh_export_cbmi
+ .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );
+ _options_jmenu
+ .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );
+ customizeJMenuItem( _choose_font_mi );
+ customizeJMenuItem( _choose_minimal_confidence_mi );
+ customizeJMenuItem( _switch_colors_mi );
+ customizeJMenuItem( _choose_pdf_width_mi );
+ customizeJMenuItem( _overview_placment_mi );
+ customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi,
+ getOptions().isShowDefaultNodeShapesExternal() );
+ customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi,
+ getOptions().isShowDefaultNodeShapesInternal() );
+ customizeCheckBoxMenuItem( _show_default_node_shapes_for_marked_cbmi,
+ getOptions().isShowDefaultNodeShapesForMarkedNodes() );
+ customizeJMenuItem( _cycle_node_shape_mi );
+ customizeJMenuItem( _cycle_node_fill_mi );
+ customizeJMenuItem( _choose_node_size_mi );
+ customizeJMenuItem( _cycle_data_return );
+ customizeCheckBoxMenuItem( _color_labels_same_as_parent_branch,
+ getOptions().isColorLabelsSameAsParentBranch() );
+ customizeCheckBoxMenuItem( _color_by_taxonomic_group_cbmi, getOptions().isColorByTaxonomicGroup() );
+ customizeCheckBoxMenuItem( _screen_antialias_cbmi, getOptions().isAntialiasScreen() );
+ customizeCheckBoxMenuItem( _background_gradient_cbmi, getOptions().isBackgroundColorGradient() );
+ customizeCheckBoxMenuItem( _show_domain_labels, getOptions().isShowDomainLabels() );
+ customizeCheckBoxMenuItem( _show_annotation_ref_source, getOptions().isShowAnnotationRefSource() );
+ customizeCheckBoxMenuItem( _abbreviate_scientific_names, getOptions().isAbbreviateScientificTaxonNames() );
+ customizeCheckBoxMenuItem( _search_case_senstive_cbmi, getOptions().isSearchCaseSensitive() );
+ customizeCheckBoxMenuItem( _show_scale_cbmi, getOptions().isShowScale() );
+ customizeCheckBoxMenuItem( _collapsed_with_average_height_cbmi, getOptions().isCollapsedWithAverageHeigh() );
+ customizeCheckBoxMenuItem( _show_abbreviated_labels_for_collapsed_nodes_cbmi, getOptions().isShowAbbreviatedLabelsForCollapsedNodes() );
+
+ customizeRadioButtonMenuItem( _non_lined_up_cladograms_rbmi,
+ getOptions().getCladogramType() == CLADOGRAM_TYPE.NON_LINED_UP );
+ customizeRadioButtonMenuItem( _ext_node_dependent_cladogram_rbmi,
+ getOptions().getCladogramType() == CLADOGRAM_TYPE.LINED_UP );
+ customizeCheckBoxMenuItem( _show_overview_cbmi, getOptions().isShowOverview() );
+ customizeCheckBoxMenuItem( _label_direction_cbmi,
+ getOptions().getNodeLabelDirection() == NODE_LABEL_DIRECTION.RADIAL );
+ customizeCheckBoxMenuItem( _antialias_print_cbmi, getOptions().isAntialiasPrint() );
+ customizeCheckBoxMenuItem( _print_black_and_white_cbmi, getOptions().isPrintBlackAndWhite() );
+ customizeCheckBoxMenuItem( _internal_number_are_confidence_for_nh_parsing_cbmi,
+ getOptions().isInternalNumberAreConfidenceForNhParsing() );
+ customizeRadioButtonMenuItem( _extract_taxonomy_no_rbmi,
+ getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.NO );
+ customizeRadioButtonMenuItem( _extract_taxonomy_pfam_strict_rbmi,
+ getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT );
+ customizeRadioButtonMenuItem( _extract_taxonomy_pfam_relaxed_rbmi,
+ getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED );
+ customizeRadioButtonMenuItem( _extract_taxonomy_agressive_rbmi,
+ getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.AGGRESSIVE );
+ customizeCheckBoxMenuItem( _replace_underscores_cbmi, getOptions().isReplaceUnderscoresInNhParsing() );
+ customizeCheckBoxMenuItem( _allow_errors_in_distance_to_parent_cbmi,
+ getOptions().isReplaceUnderscoresInNhParsing() );
+ customizeCheckBoxMenuItem( _search_with_regex_cbmi, getOptions().isSearchWithRegex() );
+ customizeCheckBoxMenuItem( _search_whole_words_only_cbmi, getOptions().isMatchWholeTermsOnly() );
+ customizeCheckBoxMenuItem( _inverse_search_result_cbmi, getOptions().isInverseSearchResult() );
+ customizeCheckBoxMenuItem( _color_all_found_nodes_when_coloring_subtree_cbmi,
+ getOptions().isColorAllFoundNodesWhenColoringSubtree() );
+ customizeCheckBoxMenuItem( _parse_beast_style_extended_nexus_tags_cbmi,
+ getOptions().isParseBeastStyleExtendedNexusTags() );
+ customizeCheckBoxMenuItem( _graphics_export_visible_only_cbmi, getOptions().isGraphicsExportVisibleOnly() );
+ customizeCheckBoxMenuItem( _show_confidence_stddev_cbmi, getOptions().isShowConfidenceStddev() );
+ customizeCheckBoxMenuItem( _use_brackets_for_conf_in_nh_export_cbmi,
+ getOptions()
+ .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );
+ customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi,
+ getOptions()
+ .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );
+ customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData() );
+ customizeCheckBoxMenuItem( _right_line_up_domains_cbmi, getOptions().isRightLineUpDomains() );
+ _jmenubar.add( _options_jmenu );
+ }
+
+ void buildPhylogeneticInferenceMenu() {
+ final InferenceManager im = getInferenceManager();
+ _inference_menu = MainFrame.createMenu( "Inference", getConfiguration() );
+ _inference_menu.add( _inference_from_msa_item = new JMenuItem( "From Multiple Sequence Alignment..." ) );
+ customizeJMenuItem( _inference_from_msa_item );
+ _inference_from_msa_item.setToolTipText( "Basic phylogenetic inference from MSA" );
+ if ( im.canDoMsa() ) {
+ _inference_menu.add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences..." ) );
+ customizeJMenuItem( _inference_from_seqs_item );
+ _inference_from_seqs_item
+ .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );
+ }
+ else {
+ _inference_menu
+ .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );
+ customizeJMenuItem( _inference_from_seqs_item );
+ _inference_from_seqs_item.setEnabled( false );
+ }
+ _jmenubar.add( _inference_menu );
+ }
+
+ void buildToolsMenu() {
+ _tools_menu = createMenu( "Tools", getConfiguration() );
+ _tools_menu.add( _confcolor_item = new JMenuItem( "Colorize Branches Depending on Confidence" ) );
+ customizeJMenuItem( _confcolor_item );
+ _tools_menu.add( _color_rank_jmi = new JMenuItem( "Colorize Subtrees via Taxonomic Rank" ) );
+ customizeJMenuItem( _color_rank_jmi );
+ _color_rank_jmi.setToolTipText( "for example, at \"Class\" level, colorize mammal specific subtree red" );
+ _tools_menu.add( _taxcolor_item = new JMenuItem( "Taxonomy Colorize Branches" ) );
+ customizeJMenuItem( _taxcolor_item );
+ _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" );
+ 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" );
+ customizeJMenuItem( _remove_branch_color_item );
+ _tools_menu.addSeparator();
+ _tools_menu.add( _annotate_item = new JMenuItem( "Annotate Sequences of Selected Nodes" ) );
+ customizeJMenuItem( _annotate_item );
+ _tools_menu.addSeparator();
+ _tools_menu.add( _midpoint_root_item = new JMenuItem( "Midpoint-Root" ) );
+ customizeJMenuItem( _midpoint_root_item );
+ _tools_menu.addSeparator();
+ _tools_menu.add( _delete_selected_nodes_item = new JMenuItem( "Delete Selected Nodes" ) );
+ _delete_selected_nodes_item.setToolTipText( "To delete all selected external nodes" );
+ customizeJMenuItem( _delete_selected_nodes_item );
+ _tools_menu.add( _delete_not_selected_nodes_item = new JMenuItem( "Retain Selected Nodes" ) );
+ _delete_not_selected_nodes_item.setToolTipText( "To delete all not selected external nodes" );
+ customizeJMenuItem( _delete_not_selected_nodes_item );
+ _tools_menu.addSeparator();
+ _tools_menu.add( _collapse_species_specific_subtrees = new JMenuItem( "Collapse Single Taxonomy-Subtrees" ) );
+ customizeJMenuItem( _collapse_species_specific_subtrees );
+ _collapse_species_specific_subtrees.setToolTipText( "To (reversibly) collapse subtrees associated with only one taxonomy (such as species specific subtrees)" );
+ _tools_menu
+ .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );
+ customizeJMenuItem( _collapse_below_threshold );
+ _collapse_below_threshold
+ .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)" );
+ //
+ _tools_menu
+ .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );
+ customizeJMenuItem( _collapse_below_branch_length );
+ _collapse_below_branch_length
+ .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );
+ //
+ _tools_menu.addSeparator();
+ _tools_menu
+ .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', 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 );
+ _move_node_names_to_tax_sn_jmi.setToolTipText( "To interpret node names as taxonomic scientific names" );
+ _tools_menu.add( _move_node_names_to_seq_names_jmi = new JMenuItem( "Transfer Node Names to Sequence Names" ) );
+ customizeJMenuItem( _move_node_names_to_seq_names_jmi );
+ _move_node_names_to_seq_names_jmi.setToolTipText( "To interpret node names as sequence (protein, gene) names" );
+ _tools_menu.addSeparator();
+ _tools_menu.add( _obtain_seq_information_jmi = new JMenuItem( "Obtain Sequence Information" ) );
+ customizeJMenuItem( _obtain_seq_information_jmi );
+ _obtain_seq_information_jmi.setToolTipText( "To add additional sequence information" );
+ _tools_menu
+ .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );
+ customizeJMenuItem( _obtain_detailed_taxonomic_information_jmi );
+ _obtain_detailed_taxonomic_information_jmi
+ .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );
+ _tools_menu
+ .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );
+ customizeJMenuItem( _obtain_detailed_taxonomic_information_deleting_jmi );
+ _obtain_detailed_taxonomic_information_deleting_jmi
+ .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );
+ _tools_menu.addSeparator();
+ _tools_menu.add( _read_values_jmi = new JMenuItem( "Attach Vector/Expression Values" ) );
+ customizeJMenuItem( _read_values_jmi );
+ _read_values_jmi.setToolTipText( "To attach vector (e.g. gene expression) values to tree nodes (beta)" );
+ _jmenubar.add( _tools_menu );
+ _tools_menu.add( _read_seqs_jmi = new JMenuItem( "Attach Molecular Sequences" ) );
+ customizeJMenuItem( _read_seqs_jmi );
+ _read_seqs_jmi
+ .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );
+ _jmenubar.add( _tools_menu );