From b0e44267b1b9686573c2fd0eb8ef1e14814106c8 Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Wed, 30 Jul 2014 19:45:23 +0000 Subject: [PATCH] in progress --- .../java/src/org/forester/archaeopteryx/Constants.java | 4 ++-- .../java/src/org/forester/archaeopteryx/MainFrame.java | 13 ++++++------- .../org/forester/archaeopteryx/MainFrameApplication.java | 11 +++++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/forester/java/src/org/forester/archaeopteryx/Constants.java b/forester/java/src/org/forester/archaeopteryx/Constants.java index 1f8e21e..27b1f7a 100644 --- a/forester/java/src/org/forester/archaeopteryx/Constants.java +++ b/forester/java/src/org/forester/archaeopteryx/Constants.java @@ -42,8 +42,8 @@ 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.9892 beta"; - final static String PRG_DATE = "140623"; + final static String VERSION = "0.9893 beta"; + final static String PRG_DATE = "140730"; 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" }; diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 8bbedf1..28d0ae3 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -165,8 +165,8 @@ public abstract class MainFrame extends JFrame implements ActionListener { JMenuItem _annotate_item; JMenuItem _remove_branch_color_item; JMenuItem _remove_visual_styles_item; - JMenuItem _deleted_selected_nodes_item; - JMenuItem _deleted_not_selected_nodes_item; + JMenuItem _delete_selected_nodes_item; + JMenuItem _delete_not_selected_nodes_item; // font size menu: JMenuItem _super_tiny_fonts_item; JMenuItem _tiny_fonts_item; @@ -325,13 +325,13 @@ public abstract class MainFrame extends JFrame implements ActionListener { } midpointRoot(); } - else if ( o == _deleted_selected_nodes_item ) { + else if ( o == _delete_selected_nodes_item ) { if ( isSubtreeDisplayed() ) { return; } deleteSelectedNodes( true ); } - else if ( o == _deleted_not_selected_nodes_item ) { + else if ( o == _delete_not_selected_nodes_item ) { if ( isSubtreeDisplayed() ) { return; } @@ -570,7 +570,6 @@ public abstract class MainFrame extends JFrame implements ActionListener { if ( delete ) { res = ext - todo; } - if ( res < 1 ) { JOptionPane.showMessageDialog( this, "Cannot delete all nodes", @@ -578,9 +577,9 @@ public abstract class MainFrame extends JFrame implements ActionListener { JOptionPane.ERROR_MESSAGE ); return; } - final int result = JOptionPane.showConfirmDialog( null, "OK to " + function.toLowerCase() + " " + todo + final int result = JOptionPane.showConfirmDialog( null, function + " " + todo + " external node(s), from a total of " + ext + " external nodes," + "\nresulting in tree with " + res - + " nodes", function + " external nodes", JOptionPane.OK_CANCEL_OPTION ); + + " nodes?", function + " external nodes", JOptionPane.OK_CANCEL_OPTION ); if ( result == JOptionPane.OK_OPTION ) { if ( !delete ) { final List to_delete = new ArrayList(); diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java index b688722..ab1f999 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java @@ -1077,10 +1077,13 @@ public final class MainFrameApplication extends MainFrame { _tools_menu.add( _midpoint_root_item = new JMenuItem( "Midpoint-Root" ) ); customizeJMenuItem( _midpoint_root_item ); _tools_menu.addSeparator(); - _tools_menu.add( _deleted_selected_nodes_item = new JMenuItem( "Delete Selected Nodes" ) ); - customizeJMenuItem( _deleted_selected_nodes_item ); - _tools_menu.add( _deleted_not_selected_nodes_item = new JMenuItem( "Retain Selected Nodes" ) ); - customizeJMenuItem( _deleted_not_selected_nodes_item ); + _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 Species-Specific Subtrees" ) ); customizeJMenuItem( _collapse_species_specific_subtrees ); -- 1.7.10.2