X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FMainFrame.java;h=dedc7ac791a5b26b5a4340d74303ad3c4a0f4c8a;hb=06b38f91bc061d8ab1dfea3b6238c94c95a30d26;hp=ef2ebcb078cd59bef568212871c4ff0dcdab94c9;hpb=7e567e18a5ba32035a8db4ca041023c9e862d25b;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index ef2ebcb..dedc7ac 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -98,7 +98,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { static final String SEARCH_TERMS_ONLY_LABEL = "Match Complete Terms Only"; static final String SEARCH_CASE_SENSITIVE_LABEL = "Case Sensitive"; static final String INVERSE_SEARCH_RESULT_LABEL = "Negate Result"; - static final String DISPLAY_BRANCH_LENGTH_VALUES_LABEL = "Branch Length Values"; static final String COLOR_BY_TAXONOMIC_GROUP = "Colorize by Taxonomic Group"; static final String DISPLAY_SCALE_LABEL = "Scale"; static final String NON_LINED_UP_CLADOGRAMS_LABEL = "Non-Lined Up Cladograms"; @@ -108,8 +107,9 @@ public abstract class MainFrame extends JFrame implements ActionListener { static final String SCREEN_ANTIALIAS_LABEL = "Antialias"; static final String COLOR_LABELS_LABEL = "Colorize Labels Same as Parent Branch"; static final String BG_GRAD_LABEL = "Background Color Gradient"; - static final String DISPLAY_NODE_BOXES_LABEL_EXT = "External Node Shapes"; - static final String DISPLAY_NODE_BOXES_LABEL_INT = "Internal Node Shapes"; + static final String DISPLAY_NODE_BOXES_LABEL_EXT = "Shapes for External Nodes"; + static final String DISPLAY_NODE_BOXES_LABEL_INT = "Shapes for Internal Nodes"; + static final String DISPLAY_NODE_BOXES_LABEL_MARKED = "Shapes for Nodes with Visual Data"; static final String SHOW_OVERVIEW_LABEL = "Overview"; static final String FONT_SIZE_MENU_LABEL = "Font Size"; static final String NONUNIFORM_CLADOGRAMS_LABEL = "External Node Sum Dependent Cladograms"; @@ -126,7 +126,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { static final String USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL = "Use Internal Node Names for Confidence Values"; static final String SHOW_BASIC_TREE_INFORMATION_LABEL = "Basic Tree Information"; static final String RIGHT_LINE_UP_DOMAINS = "Right-align Domain Architectures"; - static final String LINE_UP_RENDERABLE_DATA = "Line Up Node Diagrams"; + static final String LINE_UP_RENDERABLE_DATA = "Line Up Diagrams (such as Domain Architectures)"; JMenuBar _jmenubar; JMenu _file_jmenu; JMenu _tools_menu; @@ -155,7 +155,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { JMenuItem _confcolor_item; JMenuItem _color_rank_jmi; JMenuItem _collapse_species_specific_subtrees; - JMenuItem _collapse_below_threshold; //TODO implememt me JMenuItem _obtain_detailed_taxonomic_information_jmi; JMenuItem _obtain_detailed_taxonomic_information_deleting_jmi; JMenuItem _obtain_seq_information_jmi; @@ -184,7 +183,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { JRadioButtonMenuItem _non_lined_up_cladograms_rbmi; JRadioButtonMenuItem _uniform_cladograms_rbmi; JRadioButtonMenuItem _ext_node_dependent_cladogram_rbmi; - JCheckBoxMenuItem _show_branch_length_values_cbmi; JCheckBoxMenuItem _color_by_taxonomic_group_cbmi; JCheckBoxMenuItem _show_scale_cbmi; //TODO fix me JCheckBoxMenuItem _show_overview_cbmi; @@ -196,6 +194,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { JMenuItem _choose_minimal_confidence_mi; JCheckBoxMenuItem _show_default_node_shapes_internal_cbmi; JCheckBoxMenuItem _show_default_node_shapes_external_cbmi; + JCheckBoxMenuItem _show_default_node_shapes_for_marked_cbmi; JMenuItem _cycle_node_shape_mi; JMenuItem _cycle_node_fill_mi; JMenuItem _choose_node_size_mi; @@ -346,7 +345,9 @@ public abstract class MainFrame extends JFrame implements ActionListener { switchColors(); } else if ( o == _display_basic_information_item ) { - displayBasicInformation( getCurrentTreePanel().getTreeFile() ); + if ( getCurrentTreePanel() != null ) { + displayBasicInformation( getCurrentTreePanel().getTreeFile() ); + } } else if ( o == _view_as_NH_item ) { viewAsNH(); @@ -430,6 +431,9 @@ public abstract class MainFrame extends JFrame implements ActionListener { else if ( o == _show_default_node_shapes_external_cbmi ) { updateOptions( getOptions() ); } + else if ( o == _show_default_node_shapes_for_marked_cbmi ) { + updateOptions( getOptions() ); + } else if ( o == _non_lined_up_cladograms_rbmi ) { updateOptions( getOptions() ); showWhole(); @@ -460,9 +464,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { else if ( o == _show_scale_cbmi ) { updateOptions( getOptions() ); } - else if ( o == _show_branch_length_values_cbmi ) { - updateOptions( getOptions() ); - } else if ( o == _color_by_taxonomic_group_cbmi ) { updateOptions( getOptions() ); } @@ -1312,6 +1313,8 @@ public abstract class MainFrame extends JFrame implements ActionListener { && _show_default_node_shapes_internal_cbmi.isSelected() ); options.setShowDefaultNodeShapesExternal( ( _show_default_node_shapes_external_cbmi != null ) && _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() ); if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) { options.setCladogramType( CLADOGRAM_TYPE.NON_LINED_UP ); } @@ -1337,9 +1340,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { options.setShowOverview( ( _show_overview_cbmi != null ) && _show_overview_cbmi.isSelected() ); options.setShowConfidenceStddev( ( _show_confidence_stddev_cbmi != null ) && _show_confidence_stddev_cbmi.isSelected() ); - if ( ( _show_branch_length_values_cbmi != null ) && _show_branch_length_values_cbmi.isEnabled() ) { - options.setShowBranchLengthValues( _show_branch_length_values_cbmi.isSelected() ); - } if ( ( _color_by_taxonomic_group_cbmi != null ) && _color_by_taxonomic_group_cbmi.isEnabled() ) { options.setColorByTaxonomicGroup( _color_by_taxonomic_group_cbmi.isSelected() ); } @@ -1824,84 +1824,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { mi.setText( "Enter Default Node Shape Size... (current: " + options.getDefaultNodeShapeSize() + ")" ); } - static void updateOptionsMenuDependingOnPhylogenyType( final MainPanel main_panel, - final JCheckBoxMenuItem scale, - final JCheckBoxMenuItem branch_lengths, - final JRadioButtonMenuItem non_lined_up, - final JRadioButtonMenuItem uniform_clado, - final JRadioButtonMenuItem nonuniform_clado, - final JCheckBoxMenuItem label_direction_cbmi ) { - final TreePanel tree_panel = main_panel.getCurrentTreePanel(); - final ControlPanel control = main_panel.getControlPanel(); - final Options options = main_panel.getOptions(); - scale.setSelected( options.isShowScale() ); - branch_lengths.setSelected( options.isShowBranchLengthValues() ); - // non_lined_up.setSelected( options.isNonLinedUpCladogram() ); - if ( ( tree_panel != null ) && ( !tree_panel.isPhyHasBranchLengths() ) ) { - scale.setSelected( false ); - scale.setEnabled( false ); - branch_lengths.setSelected( false ); - branch_lengths.setEnabled( false ); - } - else if ( ( tree_panel != null ) && !control.isDrawPhylogram() ) { - scale.setSelected( false ); - scale.setEnabled( false ); - branch_lengths.setEnabled( true ); - } - else { - scale.setEnabled( true ); - branch_lengths.setEnabled( true ); - } - if ( ( tree_panel != null ) - && ( ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.ROUNDED ) - && ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) && ( tree_panel - .getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) ) ) { - branch_lengths.setSelected( false ); - branch_lengths.setEnabled( false ); - } - if ( tree_panel != null ) { - if ( ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) - || ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) { - non_lined_up.setEnabled( false ); - uniform_clado.setEnabled( false ); - nonuniform_clado.setEnabled( false ); - } - else { - non_lined_up.setEnabled( true ); - uniform_clado.setEnabled( true ); - nonuniform_clado.setEnabled( true ); - } - } - else { - if ( ( tree_panel != null ) - && ( ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) && ( tree_panel - .getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) ) ) { - branch_lengths.setSelected( false ); - branch_lengths.setEnabled( false ); - } - if ( ( tree_panel != null ) - && ( ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) || ( tree_panel - .getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) ) ) { - non_lined_up.setEnabled( false ); - } - else { - // non_lined_up.setSelected( options.isNonLinedUpCladogram() ); - non_lined_up.setEnabled( true ); - } - } - label_direction_cbmi.setEnabled( true ); - if ( tree_panel != null ) { - if ( ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.UNROOTED ) - && ( tree_panel.getPhylogenyGraphicsType() != PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) ) { - label_direction_cbmi.setEnabled( false ); - } - if ( tree_panel.getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.CIRCULAR ) { - scale.setSelected( false ); - scale.setEnabled( false ); - } - } - } - static void updateScreenTextAntialias( final List treepanels ) { for( final TreePanel tree_panel : treepanels ) { tree_panel.setTextAntialias();