From 36fdaa24d86e60c4e710147c3f2b7c8fdf0ed5df Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Thu, 28 Mar 2013 19:36:22 +0000 Subject: [PATCH] inprogress --- .../src/org/forester/archaeopteryx/AptxUtil.java | 10 ++--- .../org/forester/archaeopteryx/ArchaeopteryxE.java | 6 ++- .../org/forester/archaeopteryx/ControlPanel.java | 10 ++--- .../src/org/forester/archaeopteryx/MainFrame.java | 3 +- .../org/forester/io/writers/PhylogenyWriter.java | 40 +++++--------------- 5 files changed, 26 insertions(+), 43 deletions(-) diff --git a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java index 89a0cda..35b0e2b 100644 --- a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java +++ b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java @@ -795,9 +795,8 @@ public final class AptxUtil { desc.append( "\n" ); desc.append( " Median: " + ForesterUtil.round( bs.median(), 6 ) ); desc.append( "\n" ); - desc.append( " Mean: " + ForesterUtil.round( bs.arithmeticMean(), 6 ) ); - desc.append( "\n" ); - desc.append( " SD: " + ForesterUtil.round( bs.sampleStandardDeviation(), 6 ) ); + desc.append( " Mean: " + ForesterUtil.round( bs.arithmeticMean(), 6 ) + " (±" + + ForesterUtil.round( bs.sampleStandardDeviation(), 6 ) + ")" ); desc.append( "\n" ); desc.append( " Minimum: " + ForesterUtil.round( bs.getMin(), 6 ) ); desc.append( "\n" ); @@ -816,9 +815,8 @@ public final class AptxUtil { desc.append( "\n" ); desc.append( " Median: " + ForesterUtil.round( ds.median(), 2 ) ); desc.append( "\n" ); - desc.append( " Mean: " + ForesterUtil.round( ds.arithmeticMean(), 2 ) ); - desc.append( "\n" ); - desc.append( " SD: " + ForesterUtil.round( ds.sampleStandardDeviation(), 2 ) ); + desc.append( " Mean: " + ForesterUtil.round( ds.arithmeticMean(), 2 ) + " (±" + + ForesterUtil.round( ds.sampleStandardDeviation(), 2 ) + ")" ); desc.append( "\n" ); desc.append( " Minimum: " + ForesterUtil.roundToInt( ds.getMin() ) ); desc.append( "\n" ); diff --git a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java index a855d90..aab7b78 100644 --- a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java +++ b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java @@ -262,6 +262,9 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { else if ( o == _label_direction_cbmi ) { updateOptions( getOptions() ); } + else if ( o == _abbreviate_scientific_names ) { + updateOptions( getOptions() ); + } else if ( o == _show_overview_cbmi ) { updateOptions( getOptions() ); if ( getCurrentTreePanel() != null ) { @@ -812,7 +815,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { void buildViewMenu() { _view_jmenu = MainFrame.createMenu( "View", getConfiguration() ); - _view_jmenu.add( _display_basic_information_item = new JMenuItem( "Display Basic Information" ) ); + _view_jmenu + .add( _display_basic_information_item = new JMenuItem( MainFrame.SHOW_BASIC_TREE_INFORMATION_LABEL ) ); _view_jmenu.addSeparator(); _view_jmenu.add( _view_as_XML_item = new JMenuItem( "View as phyloXML" ) ); _view_jmenu.add( _view_as_NH_item = new JMenuItem( "View as Newick" ) ); diff --git a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java index 8c80f0c..d1c071c 100644 --- a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java @@ -470,11 +470,11 @@ final class ControlPanel extends JPanel implements ActionListener { _zoom_in_y = new JButton( "Y+" ); _zoom_out_y = new JButton( "Y-" ); _show_whole = new JButton( "F" ); - _show_whole.setToolTipText( "To fit the complete phylogeny to the current display size [Backspace]" ); - _zoom_in_x.setToolTipText( "To zoom in horizontally [Shift+Right]" ); - _zoom_in_y.setToolTipText( "To zoom in vertically [Shift+Up]" ); - _zoom_out_x.setToolTipText( "To zoom out horizontally [Shift+Left]" ); - _zoom_out_y.setToolTipText( "To zoom out vertically [Shift+Down]" ); + _show_whole.setToolTipText( "To fit the complete phylogeny to the current display size [F or Home]" ); + _zoom_in_x.setToolTipText( "To zoom in horizontally [Shift+cursor-right]" ); + _zoom_in_y.setToolTipText( "To zoom in vertically [Shift+cursor-up]" ); + _zoom_out_x.setToolTipText( "To zoom out horizontally [Shift+cursor-left]" ); + _zoom_out_y.setToolTipText( "To zoom out vertically [Shift+cursor-down]" ); if ( getConfiguration().isUseNativeUI() && AptxUtil.isMac() ) { _zoom_out_x.setPreferredSize( new Dimension( 55, 10 ) ); _zoom_in_x.setPreferredSize( new Dimension( 55, 10 ) ); diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index c26c630..e4bd6f1 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -120,6 +120,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { static final String SHOW_CONF_STDDEV_LABEL = "Show Confidence Standard Deviations"; static final String USE_BRACKETS_FOR_CONF_IN_NH_LABEL = "Use Brackets for Confidence Values"; 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 = "Show Basic Tree Information"; JMenuBar _jmenubar; JMenu _file_jmenu; JMenu _tools_menu; @@ -651,7 +652,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { void buildViewMenu() { _view_jmenu = createMenu( "View", getConfiguration() ); - _view_jmenu.add( _display_basic_information_item = new JMenuItem( "Display Basic Information" ) ); + _view_jmenu.add( _display_basic_information_item = new JMenuItem( SHOW_BASIC_TREE_INFORMATION_LABEL ) ); _view_jmenu.addSeparator(); _view_jmenu.add( _view_as_XML_item = new JMenuItem( "View as phyloXML" ) ); _view_jmenu.add( _view_as_NH_item = new JMenuItem( "View as Newick" ) ); diff --git a/forester/java/src/org/forester/io/writers/PhylogenyWriter.java b/forester/java/src/org/forester/io/writers/PhylogenyWriter.java index 454ca74..e4b7dc7 100644 --- a/forester/java/src/org/forester/io/writers/PhylogenyWriter.java +++ b/forester/java/src/org/forester/io/writers/PhylogenyWriter.java @@ -622,44 +622,24 @@ public final class PhylogenyWriter { } if ( tree != null ) { reset( writer, tree ); - boolean rerootable = true; String unit = ""; String type = ""; - String rooted = "false"; - if ( tree.isRooted() ) { - rooted = "true"; - } - if ( !tree.isRerootable() ) { - rerootable = false; - } if ( !ForesterUtil.isEmpty( tree.getDistanceUnit() ) ) { unit = tree.getDistanceUnit(); } if ( !ForesterUtil.isEmpty( tree.getType() ) ) { type = tree.getType(); } - if ( rerootable ) { - PhylogenyDataUtil.appendOpen( writer, - PhyloXmlMapping.PHYLOGENY, - PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR, - rooted, - PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR, - unit, - PhyloXmlMapping.PHYLOGENY_TYPE_ATTR, - type ); - } - else { - PhylogenyDataUtil.appendOpen( writer, - PhyloXmlMapping.PHYLOGENY, - PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR, - rooted, - PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR, - unit, - PhyloXmlMapping.PHYLOGENY_TYPE_ATTR, - type, - PhyloXmlMapping.PHYLOGENY_IS_REROOTABLE_ATTR, - "false" ); - } + PhylogenyDataUtil.appendOpen( writer, + PhyloXmlMapping.PHYLOGENY, + PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR, + tree.isRooted() + "", + PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR, + unit, + PhyloXmlMapping.PHYLOGENY_TYPE_ATTR, + type, + PhyloXmlMapping.PHYLOGENY_IS_REROOTABLE_ATTR, + tree.isRerootable() + "" ); appendPhylogenyLevelPhyloXml( writer, tree ); while ( isHasNext() ) { next(); -- 1.7.10.2