X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FControlPanel.java;h=98d5b5417c28916d3acdd3b4051117006c6a9277;hb=74409250720d04a225c98497ff395e04757d8c81;hp=9549aef7ed5bfc6bc8d5455ab98d66c90c84bcd8;hpb=d33a5a1d64863f9b0207e1da71151396cea74a38;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java index 9549aef..98d5b54 100644 --- a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java @@ -65,110 +65,115 @@ import org.forester.phylogeny.PhylogenyMethods.DESCENDANT_SORT_PRIORITY; import org.forester.phylogeny.PhylogenyNode; import org.forester.phylogeny.data.Sequence; import org.forester.phylogeny.data.SequenceRelation; +import org.forester.phylogeny.data.SequenceRelation.SEQUENCE_RELATION_TYPE; import org.forester.phylogeny.iterators.PhylogenyNodeIterator; import org.forester.util.ForesterUtil; final class ControlPanel extends JPanel implements ActionListener { - final static Font jcb_bold_font = new Font( Configuration.getDefaultFontFamilyName(), - Font.BOLD, - 9 ); - final static Font jcb_font = new Font( Configuration.getDefaultFontFamilyName(), - Font.PLAIN, - 9 ); - final static Font js_font = new Font( Configuration.getDefaultFontFamilyName(), - Font.PLAIN, - 9 ); - private static final String RETURN_TO_SUPER_TREE_TEXT = "Back to Super Tree"; - private static final long serialVersionUID = -8463483932821545633L; - private NodeClickAction _action_when_node_clicked; - private int _add_new_node_item; - private Map _all_click_to_names; - private Map _annotation_colors; - private int _blast_item; - private JComboBox _click_to_combobox; - private JLabel _click_to_label; - private List _click_to_names; - private int _collapse_cb_item; - private JCheckBox _color_acc_species; - private JCheckBox _color_according_to_annotation; - private boolean _color_branches; - private JCheckBox _color_branches_cb; - private int _color_subtree_cb_item; + final static Font jcb_bold_font = new Font( Configuration.getDefaultFontFamilyName(), + Font.BOLD, + 9 ); + final static Font jcb_font = new Font( Configuration.getDefaultFontFamilyName(), + Font.PLAIN, + 9 ); + final static Font js_font = new Font( Configuration.getDefaultFontFamilyName(), + Font.PLAIN, + 9 ); + private static final String RETURN_TO_SUPER_TREE_TEXT = "Back to Super Tree"; + private static final String SEARCH_TIP_TEXT = "Enter text to search for. Use ',' for logical OR and '+' for logical AND (not used in this manner for regular expression searches)."; + private static final long serialVersionUID = -8463483932821545633L; + private NodeClickAction _action_when_node_clicked; + private int _add_new_node_item; + private Map _all_click_to_names; + private Map _annotation_colors; + private int _blast_item; + private JComboBox _click_to_combobox; + private JLabel _click_to_label; + private List _click_to_names; + private int _collapse_cb_item; + private JCheckBox _color_acc_species; + private JCheckBox _color_acc_sequence; + private JCheckBox _color_according_to_annotation; + private boolean _color_branches; + private JCheckBox _use_visual_styles_cb; + private int _color_subtree_cb_item; + private int _change_node_font_item; // The settings from the conf file - private final Configuration _configuration; - private int _copy_subtree_item; - private int _cut_subtree_item; - private JButton _decr_domain_structure_evalue_thr; - private int _delete_node_or_subtree_item; - private JCheckBox _display_as_phylogram_cb; + private final Configuration _configuration; + private int _copy_subtree_item; + private int _cut_subtree_item; + private JButton _decr_domain_structure_evalue_thr; + private int _delete_node_or_subtree_item; + private JCheckBox _display_as_phylogram_cb; // Tree checkboxes - private JCheckBox _display_internal_data; - private JLabel _domain_display_label; - private JTextField _domain_structure_evalue_thr_tf; - private List _draw_phylogram; - private JCheckBox _dynamically_hide_data; - private int _edit_node_data_item; - private int _get_ext_desc_data; - private JButton _incr_domain_structure_evalue_thr; - private final MainPanel _mainpanel; - private JCheckBox _node_desc_popup_cb; - private int _open_pdb_item; - private int _open_seq_web_item; - private int _open_tax_web_item; - private JButton _order; - private boolean _order_of_appearance; - private int _paste_subtree_item; - private int _reroot_cb_item; - private JButton _return_to_super_tree; - - private int _select_nodes_item; - private Sequence _selected_query_seq; - private JCheckBox _seq_relation_confidence_switch; - private JComboBox _sequence_relation_type_box; - private JCheckBox _show_annotation; - private JCheckBox _show_binary_character_counts; - private JCheckBox _show_binary_characters; - // Search - private JLabel _search_found_label_0; - private JButton _search_reset_button_0; - private JTextField _search_tf_0; - private JLabel _search_found_label_1; - private JButton _search_reset_button_1; - private JTextField _search_tf_1; - + private JCheckBox _display_internal_data; + private JLabel _domain_display_label; + private JTextField _domain_structure_evalue_thr_tf; + private List _draw_phylogram; + private JCheckBox _dynamically_hide_data; + private int _edit_node_data_item; + private int _get_ext_desc_data; + private JButton _incr_domain_structure_evalue_thr; + private final MainPanel _mainpanel; + private JCheckBox _node_desc_popup_cb; + private int _open_pdb_item; + private int _open_seq_web_item; + private int _open_tax_web_item; + private int _color_node_font_item; + private JButton _order; + private boolean _order_of_appearance; + private int _paste_subtree_item; + private int _reroot_cb_item; + private JButton _return_to_super_tree; + // Search + private JLabel _search_found_label_0; + private JLabel _search_found_label_1; + private JButton _search_reset_button_0; + private JButton _search_reset_button_1; + private JTextField _search_tf_0; + private JTextField _search_tf_1; + private int _select_nodes_item; + private Sequence _selected_query_seq; + private JCheckBox _seq_relation_confidence_switch; + private JComboBox _sequence_relation_type_box; + private JCheckBox _show_annotation; + private JCheckBox _show_binary_character_counts; + private JCheckBox _show_binary_characters; // Indices for the click-to options in the combo box - private int _show_data_item; - private JCheckBox _show_domain_architectures; - private JCheckBox _show_events; - private JCheckBox _show_gene_names; - private JCheckBox _show_node_names; - private JCheckBox _show_properties_cb; - private JCheckBox _show_seq_names; - private JCheckBox _show_seq_symbols; - private JCheckBox _show_sequence_acc; - private JComboBox _show_sequence_relations; - private JCheckBox _show_taxo_code; - private JCheckBox _show_taxo_common_names; - private JCheckBox _show_taxo_images_cb; - private JCheckBox _show_taxo_scientific_names; - private JCheckBox _show_vector_data_cb; - private JButton _show_whole; - private int _sort_descendents_item; - private Map _species_colors; - private int _subtree_cb_item; - private int _swap_cb_item; - private JButton _uncollapse_all; - private JCheckBox _width_branches; - private JCheckBox _write_confidence; - private JButton _zoom_in_domain_structure; - // zooming and quick tree manipulation buttons: - private JButton _zoom_in_x; - private JButton _zoom_in_y; - private JLabel _zoom_label; - private JButton _zoom_out_domain_structure; - private JButton _zoom_out_x; - private JButton _zoom_out_y; + private int _show_data_item; + private JCheckBox _show_domain_architectures; + private JCheckBox _show_mol_seqs; + private JCheckBox _write_branch_length_values; + private JCheckBox _show_events; + private JCheckBox _show_gene_names; + private JCheckBox _show_node_names; + private JCheckBox _show_properties_cb; + private JCheckBox _show_seq_names; + private JCheckBox _show_seq_symbols; + private JCheckBox _show_sequence_acc; + private JComboBox _show_sequence_relations; + private JCheckBox _show_taxo_code; + private JCheckBox _show_taxo_common_names; + private JCheckBox _show_taxo_images_cb; + private JCheckBox _show_taxo_scientific_names; + private JCheckBox _show_vector_data_cb; + private JButton _show_whole; + private int _sort_descendents_item; + private Map _species_colors; + private Map _sequence_colors; + private int _subtree_cb_item; + private int _swap_cb_item; + private JButton _uncollapse_all; + private JCheckBox _width_branches; + private JCheckBox _write_confidence; + private JButton _zoom_in_domain_structure; + private JButton _zoom_in_x; + private JButton _zoom_in_y; + private JLabel _zoom_label; + private JButton _zoom_out_domain_structure; + private JButton _zoom_out_x; + private JButton _zoom_out_y; ControlPanel( final MainPanel ap, final Configuration configuration ) { init(); @@ -189,6 +194,16 @@ final class ControlPanel extends JPanel implements ActionListener { @Override public void actionPerformed( final ActionEvent e ) { try { + if ( e.getSource() == _color_acc_sequence ) { + if ( _color_acc_species != null ) { + _color_acc_species.setSelected( false ); + } + } + else if ( e.getSource() == _color_acc_species ) { + if ( _color_acc_sequence != null ) { + _color_acc_sequence.setSelected( false ); + } + } final TreePanel tp = getMainPanel().getCurrentTreePanel(); if ( tp == null ) { return; @@ -209,11 +224,12 @@ final class ControlPanel extends JPanel implements ActionListener { } displayedPhylogenyMightHaveChanged( true ); } - else if ( e.getSource() == _show_domain_architectures ) { + else if ( e.getSource() == _show_domain_architectures ) { search0(); search1(); displayedPhylogenyMightHaveChanged( true ); } + else if ( ( tp != null ) && ( tp.getPhylogeny() != null ) ) { if ( e.getSource() == getDisplayAsPhylogramCb() ) { setDrawPhylogram( getDisplayAsPhylogramCb().isSelected() ); @@ -237,6 +253,7 @@ final class ControlPanel extends JPanel implements ActionListener { displayedPhylogenyMightHaveChanged( false ); } else if ( e.getSource() == _show_whole ) { + displayedPhylogenyMightHaveChanged( true ); showWhole(); } else if ( e.getSource() == _return_to_super_tree ) { @@ -244,14 +261,12 @@ final class ControlPanel extends JPanel implements ActionListener { showWhole(); } else if ( e.getSource() == _order ) { - DESCENDANT_SORT_PRIORITY pri = DESCENDANT_SORT_PRIORITY.TAXONOMY; - if ( ( !isShowTaxonomyScientificNames() && !isShowTaxonomyCode() && !isShowTaxonomyCommonNames() ) ) { - if ( ( isShowSequenceAcc() || isShowSeqNames() || isShowSeqSymbols() ) ) { - pri = DESCENDANT_SORT_PRIORITY.SEQUENCE; - } - else if ( isShowNodeNames() ) { - pri = DESCENDANT_SORT_PRIORITY.NODE_NAME; - } + DESCENDANT_SORT_PRIORITY pri = DESCENDANT_SORT_PRIORITY.NODE_NAME; + if ( isShowTaxonomyScientificNames() || isShowTaxonomyCode() ) { + pri = DESCENDANT_SORT_PRIORITY.TAXONOMY; + } + else if ( isShowSeqNames() || isShowSeqSymbols() || isShowGeneNames() ) { + pri = DESCENDANT_SORT_PRIORITY.SEQUENCE; } PhylogenyMethods.orderAppearance( tp.getPhylogeny().getRoot(), _order_of_appearance, true, pri ); _order_of_appearance = !_order_of_appearance; @@ -261,7 +276,7 @@ final class ControlPanel extends JPanel implements ActionListener { tp.getPhylogeny().recalculateNumberOfExternalDescendants( true ); tp.resetNodeIdToDistToLeafMap(); tp.setEdited( true ); - displayedPhylogenyMightHaveChanged( false ); + displayedPhylogenyMightHaveChanged( true ); } else if ( e.getSource() == _uncollapse_all ) { uncollapseAll( tp ); @@ -276,11 +291,15 @@ final class ControlPanel extends JPanel implements ActionListener { displayedPhylogenyMightHaveChanged( true ); } else if ( e.getSource() == _decr_domain_structure_evalue_thr ) { - _mainpanel.getCurrentTreePanel().decreaseDomainStructureEvalueThreshold(); + _mainpanel.getCurrentTreePanel().decreaseDomainStructureEvalueThresholdExp(); + search0(); + search1(); displayedPhylogenyMightHaveChanged( true ); } else if ( e.getSource() == _incr_domain_structure_evalue_thr ) { - _mainpanel.getCurrentTreePanel().increaseDomainStructureEvalueThreshold(); + _mainpanel.getCurrentTreePanel().increaseDomainStructureEvalueThresholdExp(); + search0(); + search1(); displayedPhylogenyMightHaveChanged( true ); } else if ( e.getSource() == _search_tf_0 ) { @@ -291,6 +310,11 @@ final class ControlPanel extends JPanel implements ActionListener { search1(); displayedPhylogenyMightHaveChanged( true ); } + else if ( ( _dynamically_hide_data != null ) && ( e.getSource() == _dynamically_hide_data ) + && !_dynamically_hide_data.isSelected() ) { + setDynamicHidingIsOn( false ); + displayedPhylogenyMightHaveChanged( true ); + } else { displayedPhylogenyMightHaveChanged( true ); } @@ -311,8 +335,12 @@ final class ControlPanel extends JPanel implements ActionListener { return _color_acc_species; } - public JCheckBox getColorBranchesCb() { - return _color_branches_cb; + public JCheckBox getColorAccSequenceCb() { + return _color_acc_sequence; + } + + public JCheckBox getUseVisualStylesCb() { + return _use_visual_styles_cb; } public JCheckBox getDisplayAsPhylogramCb() { @@ -331,9 +359,9 @@ final class ControlPanel extends JPanel implements ActionListener { return _selected_query_seq; } - public JComboBox getSequenceRelationBox() { + public JComboBox getSequenceRelationBox() { if ( _show_sequence_relations == null ) { - _show_sequence_relations = new JComboBox(); + _show_sequence_relations = new JComboBox(); _show_sequence_relations.setFocusable( false ); _show_sequence_relations.setMaximumRowCount( 20 ); _show_sequence_relations.setFont( ControlPanel.js_font ); @@ -348,9 +376,9 @@ final class ControlPanel extends JPanel implements ActionListener { } /* GUILHEM_BEG */ - public JComboBox getSequenceRelationTypeBox() { + public JComboBox getSequenceRelationTypeBox() { if ( _sequence_relation_type_box == null ) { - _sequence_relation_type_box = new JComboBox(); + _sequence_relation_type_box = new JComboBox(); for( final SequenceRelation.SEQUENCE_RELATION_TYPE type : SequenceRelation.SEQUENCE_RELATION_TYPE.values() ) { _sequence_relation_type_box.addItem( type ); } @@ -388,7 +416,7 @@ final class ControlPanel extends JPanel implements ActionListener { } public void setSequenceRelationQueries( final Collection sequenceRelationQueries ) { - final JComboBox box = getSequenceRelationBox(); + final JComboBox box = getSequenceRelationBox(); while ( box.getItemCount() > 1 ) { box.removeItemAt( 1 ); } @@ -531,11 +559,16 @@ final class ControlPanel extends JPanel implements ActionListener { break; case Configuration.color_according_to_species: _color_acc_species = new JCheckBox( title ); - _color_acc_species - .setToolTipText( "To colorize taxonomy and sequence labels as a function of taxonomy" ); + _color_acc_species.setToolTipText( "To colorize node labels as a function of taxonomy" ); addJCheckBox( _color_acc_species, ch_panel ); add( ch_panel ); break; + case Configuration.color_according_to_sequence: + _color_acc_sequence = new JCheckBox( title ); + _color_acc_sequence.setToolTipText( "To colorize node labels as a function of sequence name" ); + addJCheckBox( _color_acc_sequence, ch_panel ); + add( ch_panel ); + break; case Configuration.color_according_to_annotation: _color_according_to_annotation = new JCheckBox( title ); _color_according_to_annotation @@ -593,10 +626,11 @@ final class ControlPanel extends JPanel implements ActionListener { addJCheckBox( getShowEventsCb(), ch_panel ); add( ch_panel ); break; - case Configuration.color_branches: - _color_branches_cb = new JCheckBox( title ); - getColorBranchesCb().setToolTipText( "To use branch color values, if present" ); - addJCheckBox( getColorBranchesCb(), ch_panel ); + case Configuration.use_style: + _use_visual_styles_cb = new JCheckBox( title ); + getUseVisualStylesCb() + .setToolTipText( "To use visual styles (node colors, fonts) and branch colors, if present" ); + addJCheckBox( getUseVisualStylesCb(), ch_panel ); add( ch_panel ); break; case Configuration.width_branches: @@ -605,11 +639,21 @@ final class ControlPanel extends JPanel implements ActionListener { addJCheckBox( _width_branches, ch_panel ); add( ch_panel ); break; + case Configuration.write_branch_length_values: + _write_branch_length_values = new JCheckBox( title ); + addJCheckBox( _write_branch_length_values, ch_panel ); + add( ch_panel ); + break; case Configuration.show_domain_architectures: _show_domain_architectures = new JCheckBox( title ); addJCheckBox( _show_domain_architectures, ch_panel ); add( ch_panel ); break; + case Configuration.show_mol_seqs: + _show_mol_seqs = new JCheckBox( title ); + addJCheckBox( _show_mol_seqs, ch_panel ); + add( ch_panel ); + break; case Configuration.show_seq_names: _show_seq_names = new JCheckBox( title ); addJCheckBox( _show_seq_names, ch_panel ); @@ -632,7 +676,7 @@ final class ControlPanel extends JPanel implements ActionListener { break; case Configuration.dynamically_hide_data: _dynamically_hide_data = new JCheckBox( title ); - getDynamicallyHideData().setToolTipText( "To hide labels depending on likely visibility" ); + getDynamicallyHideData().setToolTipText( "To hide labels depending on expected visibility" ); addJCheckBox( getDynamicallyHideData(), ch_panel ); add( ch_panel ); break; @@ -727,7 +771,7 @@ final class ControlPanel extends JPanel implements ActionListener { /** * Indicates what action should be execute when a node is clicked - * + * * @return the click-on action */ NodeClickAction getActionWhenNodeClicked() { @@ -761,7 +805,7 @@ final class ControlPanel extends JPanel implements ActionListener { JLabel getSearchFoundCountsLabel0() { return _search_found_label_0; } - + JLabel getSearchFoundCountsLabel1() { return _search_found_label_1; } @@ -769,7 +813,7 @@ final class ControlPanel extends JPanel implements ActionListener { JButton getSearchResetButton0() { return _search_reset_button_0; } - + JButton getSearchResetButton1() { return _search_reset_button_1; } @@ -777,7 +821,7 @@ final class ControlPanel extends JPanel implements ActionListener { JTextField getSearchTextField0() { return _search_tf_0; } - + JTextField getSearchTextField1() { return _search_tf_1; } @@ -790,6 +834,10 @@ final class ControlPanel extends JPanel implements ActionListener { return _species_colors; } + Map getSequenceColors() { + return _sequence_colors; + } + boolean isAntialiasScreenText() { return true; } @@ -802,8 +850,12 @@ final class ControlPanel extends JPanel implements ActionListener { return ( ( _color_acc_species != null ) && _color_acc_species.isSelected() ); } - boolean isColorBranches() { - return ( ( ( getColorBranchesCb() != null ) && getColorBranchesCb().isSelected() ) || ( ( getColorBranchesCb() == null ) && _color_branches ) ); + boolean isColorAccordingToSequence() { + return ( ( _color_acc_sequence != null ) && _color_acc_sequence.isSelected() ); + } + + boolean isUseVisualStyles() { + return ( ( ( getUseVisualStylesCb() != null ) && getUseVisualStylesCb().isSelected() ) || ( ( getUseVisualStylesCb() == null ) && _color_branches ) ); } boolean isDrawPhylogram() { @@ -838,10 +890,18 @@ final class ControlPanel extends JPanel implements ActionListener { return ( ( getWriteConfidenceCb() != null ) && getWriteConfidenceCb().isSelected() ); } + boolean isWriteBranchLengthValues() { + return ( ( _write_branch_length_values != null ) && _write_branch_length_values.isSelected() ); + } + boolean isShowDomainArchitectures() { return ( ( _show_domain_architectures != null ) && _show_domain_architectures.isSelected() ); } + public boolean isShowMolSequences() { + return ( ( _show_mol_seqs != null ) && _show_mol_seqs.isSelected() ); + } + boolean isShowGeneNames() { return ( ( _show_gene_names != null ) && _show_gene_names.isSelected() ); } @@ -908,8 +968,6 @@ final class ControlPanel extends JPanel implements ActionListener { if ( query != null ) { query = query.trim(); } - - if ( !ForesterUtil.isEmpty( query ) ) { search0( main_panel, tree, query ); } @@ -920,7 +978,7 @@ final class ControlPanel extends JPanel implements ActionListener { searchReset0(); } } - + void search1() { final MainPanel main_panel = getMainPanel(); final Phylogeny tree = main_panel.getCurrentPhylogeny(); @@ -931,7 +989,6 @@ final class ControlPanel extends JPanel implements ActionListener { if ( query != null ) { query = query.trim(); } - if ( !ForesterUtil.isEmpty( query ) ) { search1( main_panel, tree, query ); } @@ -942,15 +999,13 @@ final class ControlPanel extends JPanel implements ActionListener { searchReset1(); } } - - void searchReset0() { if ( getMainPanel().getCurrentTreePanel() != null ) { getMainPanel().getCurrentTreePanel().setFoundNodes0( null ); } } - + void searchReset1() { if ( getMainPanel().getCurrentTreePanel() != null ) { getMainPanel().getCurrentTreePanel().setFoundNodes1( null ); @@ -982,6 +1037,11 @@ final class ControlPanel extends JPanel implements ActionListener { _color_acc_species.setSelected( state ); } break; + case Configuration.color_according_to_sequence: + if ( _color_acc_sequence != null ) { + _color_acc_sequence.setSelected( state ); + } + break; case Configuration.color_according_to_annotation: if ( _color_according_to_annotation != null ) { _color_according_to_annotation.setSelected( state ); @@ -1037,9 +1097,9 @@ final class ControlPanel extends JPanel implements ActionListener { getShowEventsCb().setSelected( state ); } break; - case Configuration.color_branches: - if ( getColorBranchesCb() != null ) { - getColorBranchesCb().setSelected( state ); + case Configuration.use_style: + if ( getUseVisualStylesCb() != null ) { + getUseVisualStylesCb().setSelected( state ); } break; case Configuration.width_branches: @@ -1052,6 +1112,16 @@ final class ControlPanel extends JPanel implements ActionListener { _show_domain_architectures.setSelected( state ); } break; + case Configuration.write_branch_length_values: + if ( _write_branch_length_values != null ) { + _write_branch_length_values.setSelected( state ); + } + break; + case Configuration.show_mol_seqs: + if ( _show_mol_seqs != null ) { + _show_mol_seqs.setSelected( state ); + } + break; case Configuration.show_seq_names: if ( _show_seq_names != null ) { _show_seq_names.setSelected( state ); @@ -1173,6 +1243,12 @@ final class ControlPanel extends JPanel implements ActionListener { else if ( action == _open_pdb_item ) { setActionWhenNodeClicked( NodeClickAction.OPEN_PDB_WEB ); } + else if ( action == _color_node_font_item ) { + setActionWhenNodeClicked( NodeClickAction.COLOR_NODE_FONT ); + } + else if ( action == _change_node_font_item ) { + setActionWhenNodeClicked( NodeClickAction.CHANGE_NODE_FONT ); + } else { throw new RuntimeException( "unknown action: " + action ); } @@ -1195,7 +1271,6 @@ final class ControlPanel extends JPanel implements ActionListener { } void setDynamicHidingIsOn( final boolean is_on ) { - // if ( !_configuration.isUseNativeUI() ) { if ( is_on ) { getDynamicallyHideData().setForeground( getConfiguration().getGuiCheckboxAndButtonActiveColor() ); } @@ -1207,13 +1282,12 @@ final class ControlPanel extends JPanel implements ActionListener { getDynamicallyHideData().setForeground( Color.BLACK ); } } - // } } void setSearchFoundCountsOnLabel0( final int counts ) { getSearchFoundCountsLabel0().setText( "Found: " + counts ); } - + void setSearchFoundCountsOnLabel1( final int counts ) { getSearchFoundCountsLabel1().setText( "Found: " + counts ); } @@ -1229,10 +1303,10 @@ final class ControlPanel extends JPanel implements ActionListener { _species_colors = species_colors; } - /* GUILHEM_END */ - /* - * Set up the controls from the config settings. 11/26/05 - */ + void setSequenceColors( final Map sequence_colors ) { + _sequence_colors = sequence_colors; + } + void setupControls() { // The tree display options: setupDisplayCheckboxes(); @@ -1253,7 +1327,7 @@ final class ControlPanel extends JPanel implements ActionListener { } void setUpControlsForDomainStrucures() { - _domain_display_label = new JLabel( "Domain Display:" ); + _domain_display_label = new JLabel( "Domain Architectures:" ); add( customizeLabel( _domain_display_label, getConfiguration() ) ); add( _domain_display_label ); _zoom_in_domain_structure = new JButton( "d+" ); @@ -1289,14 +1363,13 @@ final class ControlPanel extends JPanel implements ActionListener { } void setupSearchTools0() { - final String tip = "Enter text to search for. Use ',' for multiple searches (logical OR) and '+' for logical AND."; final JLabel search_label = new JLabel( "Search (A):" ); search_label.setFont( ControlPanel.jcb_bold_font ); if ( !getConfiguration().isUseNativeUI() ) { search_label.setForeground( getConfiguration().getGuiCheckboxTextColor() ); } add( search_label ); - search_label.setToolTipText( tip ); + search_label.setToolTipText( SEARCH_TIP_TEXT ); _search_found_label_0 = new JLabel(); getSearchFoundCountsLabel0().setVisible( false ); _search_found_label_0.setFont( ControlPanel.jcb_bold_font ); @@ -1304,7 +1377,7 @@ final class ControlPanel extends JPanel implements ActionListener { _search_found_label_0.setForeground( getConfiguration().getGuiCheckboxTextColor() ); } _search_tf_0 = new JTextField( 3 ); - _search_tf_0.setToolTipText( tip ); + _search_tf_0.setToolTipText( SEARCH_TIP_TEXT ); _search_tf_0.setEditable( true ); if ( !getConfiguration().isUseNativeUI() ) { _search_tf_0.setForeground( getConfiguration().getGuiMenuBackgroundColor() ); @@ -1350,14 +1423,13 @@ final class ControlPanel extends JPanel implements ActionListener { } void setupSearchTools1() { - final String tip = "Enter text to search for. Use ',' for multiple searches (logical OR) and '+' for logical AND."; final JLabel search_label = new JLabel( "Search (B):" ); search_label.setFont( ControlPanel.jcb_bold_font ); if ( !getConfiguration().isUseNativeUI() ) { search_label.setForeground( getConfiguration().getGuiCheckboxTextColor() ); } add( search_label ); - search_label.setToolTipText( tip ); + search_label.setToolTipText( SEARCH_TIP_TEXT ); _search_found_label_1 = new JLabel(); getSearchFoundCountsLabel1().setVisible( false ); _search_found_label_1.setFont( ControlPanel.jcb_bold_font ); @@ -1365,7 +1437,7 @@ final class ControlPanel extends JPanel implements ActionListener { _search_found_label_1.setForeground( getConfiguration().getGuiCheckboxTextColor() ); } _search_tf_1 = new JTextField( 3 ); - _search_tf_1.setToolTipText( tip ); + _search_tf_1.setToolTipText( SEARCH_TIP_TEXT ); _search_tf_1.setEditable( true ); if ( !getConfiguration().isUseNativeUI() ) { _search_tf_1.setForeground( getConfiguration().getGuiMenuBackgroundColor() ); @@ -1409,8 +1481,7 @@ final class ControlPanel extends JPanel implements ActionListener { s_panel_2.add( _search_found_label_1 ); addJButton( _search_reset_button_1, s_panel_2 ); } - - + void showAnnotations() { if ( _show_annotation != null ) { _show_annotation.setSelected( true ); @@ -1421,6 +1492,9 @@ final class ControlPanel extends JPanel implements ActionListener { if ( _color_acc_species != null ) { _color_acc_species.setSelected( false ); } + if ( _color_acc_sequence != null ) { + _color_acc_sequence.setSelected( false ); + } _mainpanel.getCurrentTreePanel().repaint(); } @@ -1437,16 +1511,14 @@ final class ControlPanel extends JPanel implements ActionListener { _mainpanel.getCurrentTreePanel().validate(); _mainpanel.validate(); _mainpanel.getCurrentTreePanel().calcParametersForPainting( _mainpanel.getSizeOfViewport().width, - _mainpanel.getSizeOfViewport().height, - true ); + _mainpanel.getSizeOfViewport().height ); _mainpanel.getCurrentTreePanel().resetPreferredSize(); _mainpanel.adjustJScrollPane(); _mainpanel.getCurrentTreePanel().repaint(); _mainpanel.getCurrentTreePanel().validate(); _mainpanel.validate(); _mainpanel.getCurrentTreePanel().calcParametersForPainting( _mainpanel.getSizeOfViewport().width, - _mainpanel.getSizeOfViewport().height, - true ); + _mainpanel.getSizeOfViewport().height ); _mainpanel.getCurrentTreePanel().resetPreferredSize(); _mainpanel.adjustJScrollPane(); _mainpanel.getCurrentTreePanel().repaint(); @@ -1458,8 +1530,7 @@ final class ControlPanel extends JPanel implements ActionListener { if ( tree_panel != null ) { tree_panel.validate(); tree_panel.calcParametersForPainting( _mainpanel.getSizeOfViewport().width, - _mainpanel.getSizeOfViewport().height, - true ); + _mainpanel.getSizeOfViewport().height ); tree_panel.resetPreferredSize(); tree_panel.repaint(); } @@ -1473,7 +1544,7 @@ final class ControlPanel extends JPanel implements ActionListener { add( spacer ); _click_to_label = new JLabel( "Click on Node to:" ); add( customizeLabel( _click_to_label, getConfiguration() ) ); - _click_to_combobox = new JComboBox(); + _click_to_combobox = new JComboBox(); _click_to_combobox.setFocusable( false ); _click_to_combobox.setMaximumRowCount( 14 ); _click_to_combobox.setFont( ControlPanel.js_font ); @@ -1546,7 +1617,7 @@ final class ControlPanel extends JPanel implements ActionListener { void updateDomainStructureEvaluethresholdDisplay() { if ( _domain_structure_evalue_thr_tf != null ) { _domain_structure_evalue_thr_tf.setText( "10^" - + getMainPanel().getCurrentTreePanel().getDomainStructureEvalueThreshold() ); + + getMainPanel().getCurrentTreePanel().getDomainStructureEvalueThresholdExp() ); } } @@ -1674,10 +1745,10 @@ final class ControlPanel extends JPanel implements ActionListener { _sequence_relation_type_box.setBackground( getConfiguration().getGuiButtonBackgroundColor() ); _sequence_relation_type_box.setForeground( getConfiguration().getGuiButtonTextColor() ); } - _sequence_relation_type_box.setRenderer( new ListCellRenderer() { + _sequence_relation_type_box.setRenderer( new ListCellRenderer() { @Override - public Component getListCellRendererComponent( final JList list, + public Component getListCellRendererComponent( final JList list, final Object value, final int index, final boolean isSelected, @@ -1720,6 +1791,7 @@ final class ControlPanel extends JPanel implements ActionListener { private void init() { _draw_phylogram = new ArrayList(); setSpeciesColors( new HashMap() ); + setSequenceColors( new HashMap() ); setAnnotationColors( new HashMap() ); } @@ -1733,7 +1805,7 @@ final class ControlPanel extends JPanel implements ActionListener { getSearchResetButton0().setVisible( true ); String[] queries = null; List nodes = null; - if ( query_str.indexOf( ',' ) >= 0 ) { + if ( ( query_str.indexOf( ',' ) >= 0 ) && !getOptions().isSearchWithRegex() ) { queries = query_str.split( ",+" ); } else { @@ -1747,7 +1819,7 @@ final class ControlPanel extends JPanel implements ActionListener { continue; } query = query.trim(); - if ( query.indexOf( '+' ) >= 0 ) { + if ( ( query.indexOf( '+' ) >= 0 ) && !getOptions().isSearchWithRegex() ) { nodes.addAll( PhylogenyMethods.searchDataLogicalAnd( query.split( "\\++" ), tree, getOptions().isSearchCaseSensitive(), @@ -1755,11 +1827,16 @@ final class ControlPanel extends JPanel implements ActionListener { isShowDomainArchitectures() ) ); } else { + final TreePanel tp = getMainPanel().getCurrentTreePanel(); + + nodes.addAll( PhylogenyMethods.searchData( query, tree, getOptions().isSearchCaseSensitive(), !getOptions().isMatchWholeTermsOnly(), - isShowDomainArchitectures() ) ); + getOptions().isSearchWithRegex(), + isShowDomainArchitectures(), + tp != null ? Math.pow( 10, tp.getDomainStructureEvalueThresholdExp() ) : 0 ) ); } } if ( getOptions().isInverseSearchResult() ) { @@ -1780,14 +1857,14 @@ final class ControlPanel extends JPanel implements ActionListener { searchReset0(); } } - + private void search1( final MainPanel main_panel, final Phylogeny tree, final String query_str ) { getSearchFoundCountsLabel1().setVisible( true ); getSearchResetButton1().setEnabled( true ); getSearchResetButton1().setVisible( true ); String[] queries = null; List nodes = null; - if ( query_str.indexOf( ',' ) >= 0 ) { + if ( ( query_str.indexOf( ',' ) >= 0 ) && !getOptions().isSearchWithRegex() ) { queries = query_str.split( ",+" ); } else { @@ -1801,7 +1878,7 @@ final class ControlPanel extends JPanel implements ActionListener { continue; } query = query.trim(); - if ( query.indexOf( '+' ) >= 0 ) { + if ( ( query.indexOf( '+' ) >= 0 ) && !getOptions().isSearchWithRegex() ) { nodes.addAll( PhylogenyMethods.searchDataLogicalAnd( query.split( "\\++" ), tree, getOptions().isSearchCaseSensitive(), @@ -1809,11 +1886,14 @@ final class ControlPanel extends JPanel implements ActionListener { isShowDomainArchitectures() ) ); } else { + final TreePanel tp = getMainPanel().getCurrentTreePanel(); nodes.addAll( PhylogenyMethods.searchData( query, tree, getOptions().isSearchCaseSensitive(), !getOptions().isMatchWholeTermsOnly(), - isShowDomainArchitectures() ) ); + getOptions().isSearchWithRegex(), + isShowDomainArchitectures(), + tp != null ? Math.pow( 10, tp.getDomainStructureEvalueThresholdExp() ) : 0 ) ); } } if ( getOptions().isInverseSearchResult() ) { @@ -1894,6 +1974,24 @@ final class ControlPanel extends JPanel implements ActionListener { } cb_index++; } + if ( _configuration.doDisplayClickToOption( Configuration.color_node_font ) ) { + _color_node_font_item = cb_index; + addClickToOption( Configuration.color_node_font, + _configuration.getClickToTitle( Configuration.color_node_font ) ); + if ( default_option == Configuration.color_node_font ) { + selected_index = cb_index; + } + cb_index++; + } + if ( _configuration.doDisplayClickToOption( Configuration.change_node_font ) ) { + _change_node_font_item = cb_index; + addClickToOption( Configuration.change_node_font, + _configuration.getClickToTitle( Configuration.change_node_font ) ); + if ( default_option == Configuration.change_node_font ) { + selected_index = cb_index; + } + cb_index++; + } if ( _configuration.doDisplayClickToOption( Configuration.color_subtree ) ) { _color_subtree_cb_item = cb_index; addClickToOption( Configuration.color_subtree, _configuration.getClickToTitle( Configuration.color_subtree ) ); @@ -1946,48 +2044,14 @@ final class ControlPanel extends JPanel implements ActionListener { _get_ext_desc_data = cb_index; if ( !ForesterUtil.isEmpty( getConfiguration().getLabelForGetExtDescendentsData() ) ) { addClickToOption( Configuration.get_ext_desc_data, getConfiguration() - .getLabelForGetExtDescendentsData() ); + .getLabelForGetExtDescendentsData() ); } else { - String s = ";"; - switch ( getConfiguration().getExtDescNodeDataToReturn() ) { - case NODE_NAME: - s = "Node Names"; - break; - case SEQUENCE_ACC: - s = "Sequence Accessors"; - break; - case SEQUENCE_MOL_SEQ: - s = "Molecular Sequence"; - break; - case SEQUENCE_MOL_SEQ_FASTA: - s = "Molecular Sequence (Fasta)"; - break; - case SEQUENCE_NAME: - s = "Sequence Names"; - break; - case GENE_NAME: - s = "Gene Names"; - break; - case SEQUENCE_SYMBOL: - s = "Sequence Symbols"; - break; - case TAXONOMY_CODE: - s = "Taxonomy Codes"; - break; - case TAXONOMY_COMM0N_NAME: - s = "Taxonomy Common Names"; - break; - case TAXONOMY_SCIENTIFIC_NAME: - s = "Scientific Names"; - break; - case UNKNOWN: - s = "User Selected Data"; - break; - } - final String label = _configuration.getClickToTitle( Configuration.get_ext_desc_data ) + " " + s; - addClickToOption( Configuration.get_ext_desc_data, label ); + + addClickToOption( Configuration.get_ext_desc_data, + getConfiguration().getClickToTitle( Configuration.get_ext_desc_data ) ); } + if ( default_option == Configuration.get_ext_desc_data ) { selected_index = cb_index; } @@ -2076,6 +2140,12 @@ final class ControlPanel extends JPanel implements ActionListener { setCheckbox( Configuration.display_internal_data, _configuration.doCheckOption( Configuration.display_internal_data ) ); } + if ( _configuration.doDisplayOption( Configuration.color_according_to_sequence ) ) { + addCheckbox( Configuration.color_according_to_sequence, + _configuration.getDisplayTitle( Configuration.color_according_to_sequence ) ); + setCheckbox( Configuration.color_according_to_sequence, + _configuration.doCheckOption( Configuration.color_according_to_sequence ) ); + } if ( _configuration.doDisplayOption( Configuration.color_according_to_species ) ) { addCheckbox( Configuration.color_according_to_species, _configuration.getDisplayTitle( Configuration.color_according_to_species ) ); @@ -2088,9 +2158,9 @@ final class ControlPanel extends JPanel implements ActionListener { setCheckbox( Configuration.color_according_to_annotation, _configuration.doCheckOption( Configuration.color_according_to_annotation ) ); } - if ( _configuration.doDisplayOption( Configuration.color_branches ) ) { - addCheckbox( Configuration.color_branches, _configuration.getDisplayTitle( Configuration.color_branches ) ); - setCheckbox( Configuration.color_branches, _configuration.doCheckOption( Configuration.color_branches ) ); + if ( _configuration.doDisplayOption( Configuration.use_style ) ) { + addCheckbox( Configuration.use_style, _configuration.getDisplayTitle( Configuration.use_style ) ); + setCheckbox( Configuration.use_style, _configuration.doCheckOption( Configuration.use_style ) ); } if ( _configuration.doDisplayOption( Configuration.width_branches ) ) { addCheckbox( Configuration.width_branches, _configuration.getDisplayTitle( Configuration.width_branches ) ); @@ -2145,6 +2215,18 @@ final class ControlPanel extends JPanel implements ActionListener { addCheckbox( Configuration.show_annotation, _configuration.getDisplayTitle( Configuration.show_annotation ) ); setCheckbox( Configuration.show_annotation, _configuration.doCheckOption( Configuration.show_annotation ) ); } + if ( _configuration.doDisplayOption( Configuration.write_confidence_values ) ) { + addCheckbox( Configuration.write_confidence_values, + _configuration.getDisplayTitle( Configuration.write_confidence_values ) ); + setCheckbox( Configuration.write_confidence_values, + _configuration.doCheckOption( Configuration.write_confidence_values ) ); + } + if ( _configuration.doDisplayOption( Configuration.write_branch_length_values ) ) { + addCheckbox( Configuration.write_branch_length_values, + _configuration.getDisplayTitle( Configuration.write_branch_length_values ) ); + setCheckbox( Configuration.write_branch_length_values, + _configuration.doCheckOption( Configuration.write_branch_length_values ) ); + } if ( _configuration.doDisplayOption( Configuration.show_binary_characters ) ) { addCheckbox( Configuration.show_binary_characters, _configuration.getDisplayTitle( Configuration.show_binary_characters ) ); @@ -2163,11 +2245,9 @@ final class ControlPanel extends JPanel implements ActionListener { setCheckbox( Configuration.show_domain_architectures, _configuration.doCheckOption( Configuration.show_domain_architectures ) ); } - if ( _configuration.doDisplayOption( Configuration.write_confidence_values ) ) { - addCheckbox( Configuration.write_confidence_values, - _configuration.getDisplayTitle( Configuration.write_confidence_values ) ); - setCheckbox( Configuration.write_confidence_values, - _configuration.doCheckOption( Configuration.write_confidence_values ) ); + if ( _configuration.doDisplayOption( Configuration.show_mol_seqs ) ) { + addCheckbox( Configuration.show_mol_seqs, _configuration.getDisplayTitle( Configuration.show_mol_seqs ) ); + setCheckbox( Configuration.show_mol_seqs, _configuration.doCheckOption( Configuration.show_mol_seqs ) ); } if ( _configuration.doDisplayOption( Configuration.write_events ) ) { addCheckbox( Configuration.write_events, _configuration.getDisplayTitle( Configuration.write_events ) ); @@ -2192,22 +2272,171 @@ final class ControlPanel extends JPanel implements ActionListener { private void setVisibilityOfDomainStrucureControls() { if ( _zoom_in_domain_structure != null ) { - if ( isShowDomainArchitectures() ) { - _domain_display_label.setVisible( true ); - _zoom_in_domain_structure.setVisible( true ); - _zoom_out_domain_structure.setVisible( true ); - _decr_domain_structure_evalue_thr.setVisible( true ); - _incr_domain_structure_evalue_thr.setVisible( true ); - _domain_structure_evalue_thr_tf.setVisible( true ); + final MainFrame mf = getMainFrame(); + if ( mf != null ) { + if ( isShowDomainArchitectures() ) { + _domain_display_label.setVisible( true ); + _zoom_in_domain_structure.setVisible( true ); + _zoom_out_domain_structure.setVisible( true ); + _decr_domain_structure_evalue_thr.setVisible( true ); + _incr_domain_structure_evalue_thr.setVisible( true ); + _domain_structure_evalue_thr_tf.setVisible( true ); + if ( mf._right_line_up_domains_cbmi != null ) { + mf._right_line_up_domains_cbmi.setVisible( true ); + } + if ( mf._show_domain_labels != null ) { + mf._show_domain_labels.setVisible( true ); + } + } + else { + _domain_display_label.setVisible( false ); + _zoom_in_domain_structure.setVisible( false ); + _zoom_out_domain_structure.setVisible( false ); + _decr_domain_structure_evalue_thr.setVisible( false ); + _incr_domain_structure_evalue_thr.setVisible( false ); + _domain_structure_evalue_thr_tf.setVisible( false ); + if ( mf._right_line_up_domains_cbmi != null ) { + mf._right_line_up_domains_cbmi.setVisible( false ); + } + if ( mf._show_domain_labels != null ) { + mf._show_domain_labels.setVisible( false ); + } + } + } + } + } + + // This takes care of ArchaeopteryxE-issue. + // Can, and will, return null prior to ArchaeopteryxE initialization completion. + final private MainFrame getMainFrame() { + MainFrame mf = getMainPanel().getMainFrame(); + if ( mf == null ) { + // Must be "E" applet version. + final ArchaeopteryxE e = ( ArchaeopteryxE ) ( ( MainPanelApplets ) getMainPanel() ).getApplet(); + if ( e.getMainPanel() == null ) { + return null; + } + mf = e.getMainPanel().getMainFrame(); + } + return mf; + } + + void setVisibilityOfX() { + final MainFrame mf = getMainFrame(); + if ( mf != null ) { + if ( ( getCurrentTreePanel() != null ) && ( getCurrentTreePanel().getPhylogeny() != null ) ) { + if ( AptxUtil.isHasAtLeastOneBranchWithSupportSD( getCurrentTreePanel().getPhylogeny() ) ) { + if ( mf._show_confidence_stddev_cbmi != null ) { + mf._show_confidence_stddev_cbmi.setVisible( true ); + } + } + else { + if ( mf._show_confidence_stddev_cbmi != null ) { + mf._show_confidence_stddev_cbmi.setVisible( false ); + } + } + if ( AptxUtil.isHasAtLeastOneNodeWithScientificName( getCurrentTreePanel().getPhylogeny() ) ) { + if ( mf._abbreviate_scientific_names != null ) { + mf._abbreviate_scientific_names.setVisible( true ); + } + } + else { + if ( mf._abbreviate_scientific_names != null ) { + mf._abbreviate_scientific_names.setVisible( false ); + } + } + if ( AptxUtil.isHasAtLeastOneNodeWithSequenceAnnotation( getCurrentTreePanel().getPhylogeny() ) ) { + if ( mf._show_annotation_ref_source != null ) { + mf._show_annotation_ref_source.setVisible( true ); + } + } + else { + if ( mf._show_annotation_ref_source != null ) { + mf._show_annotation_ref_source.setVisible( false ); + } + } + } + if ( isDrawPhylogram() + || ( ( getCurrentTreePanel() != null ) && ( ( getCurrentTreePanel().getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) || ( getCurrentTreePanel() + .getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) ) ) { + if ( mf._non_lined_up_cladograms_rbmi != null ) { + mf._non_lined_up_cladograms_rbmi.setVisible( false ); + } + if ( mf._uniform_cladograms_rbmi != null ) { + mf._uniform_cladograms_rbmi.setVisible( false ); + } + if ( mf._ext_node_dependent_cladogram_rbmi != null ) { + mf._ext_node_dependent_cladogram_rbmi.setVisible( false ); + } } else { - _domain_display_label.setVisible( false ); - _zoom_in_domain_structure.setVisible( false ); - _zoom_out_domain_structure.setVisible( false ); - _decr_domain_structure_evalue_thr.setVisible( false ); - _incr_domain_structure_evalue_thr.setVisible( false ); - _domain_structure_evalue_thr_tf.setVisible( false ); + if ( mf._non_lined_up_cladograms_rbmi != null ) { + mf._non_lined_up_cladograms_rbmi.setVisible( true ); + } + if ( mf._uniform_cladograms_rbmi != null ) { + mf._uniform_cladograms_rbmi.setVisible( true ); + } + if ( mf._ext_node_dependent_cladogram_rbmi != null ) { + mf._ext_node_dependent_cladogram_rbmi.setVisible( true ); + } + } + if ( isDrawPhylogram() ) { + if ( mf._show_scale_cbmi != null ) { + mf._show_scale_cbmi.setVisible( true ); + } } + else { + if ( mf._show_scale_cbmi != null ) { + mf._show_scale_cbmi.setVisible( false ); + } + } + if ( getCurrentTreePanel() != null ) { + if ( ( getCurrentTreePanel().getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) + || ( getCurrentTreePanel().getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) { + if ( mf._label_direction_cbmi != null ) { + mf._label_direction_cbmi.setVisible( true ); + } + } + else { + if ( mf._label_direction_cbmi != null ) { + mf._label_direction_cbmi.setVisible( false ); + } + } + } + } + } + + void setVisibilityOfDomainStrucureCB() { + try { + if ( ( getCurrentTreePanel() != null ) + && ( ( getCurrentTreePanel().getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) || ( getCurrentTreePanel() + .getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) ) { + if ( getMainPanel().getMainFrame()._right_line_up_domains_cbmi != null ) { + getMainPanel().getMainFrame()._right_line_up_domains_cbmi.setVisible( false ); + } + if ( getMainPanel().getMainFrame()._show_domain_labels != null ) { + getMainPanel().getMainFrame()._show_domain_labels.setVisible( false ); + } + } + else if ( isShowDomainArchitectures() ) { + if ( getMainPanel().getMainFrame()._right_line_up_domains_cbmi != null ) { + getMainPanel().getMainFrame()._right_line_up_domains_cbmi.setVisible( true ); + } + if ( getMainPanel().getMainFrame()._show_domain_labels != null ) { + getMainPanel().getMainFrame()._show_domain_labels.setVisible( true ); + } + } + else { + if ( getMainPanel().getMainFrame()._right_line_up_domains_cbmi != null ) { + getMainPanel().getMainFrame()._right_line_up_domains_cbmi.setVisible( false ); + } + if ( getMainPanel().getMainFrame()._show_domain_labels != null ) { + getMainPanel().getMainFrame()._show_domain_labels.setVisible( false ); + } + } + } + catch ( final Exception ignore ) { + //not important... } } @@ -2239,6 +2468,8 @@ final class ControlPanel extends JPanel implements ActionListener { SHOW_DATA, SORT_DESCENDENTS, SUBTREE, - SWAP; + SWAP, + CHANGE_NODE_FONT, + COLOR_NODE_FONT; } }