in progress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / ControlPanel.java
index 8a15e5a..27930ec 100644 (file)
@@ -64,6 +64,7 @@ import org.forester.phylogeny.PhylogenyMethods;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Sequence;
 import org.forester.phylogeny.data.SequenceRelation;
+import org.forester.phylogeny.iterators.PhylogenyNodeIterator;
 import org.forester.util.ForesterUtil;
 
 final class ControlPanel extends JPanel implements ActionListener {
@@ -87,7 +88,6 @@ final class ControlPanel extends JPanel implements ActionListener {
     private JCheckBox            _show_node_names;
     private JCheckBox            _show_taxo_code;
     private JCheckBox            _write_confidence;
-    private JCheckBox            _write_confidence_sd;
     private JCheckBox            _show_events;
     private JCheckBox            _color_acc_species;
     private JCheckBox            _color_branches_cb;
@@ -438,11 +438,6 @@ final class ControlPanel extends JPanel implements ActionListener {
                 addJCheckBox( getWriteConfidenceCb(), ch_panel );
                 add( ch_panel );
                 break;
-            case Configuration.write_confidence_values_sd:
-                _write_confidence_sd = new JCheckBox( title );
-                addJCheckBox( getWriteConfidenceSDCb(), ch_panel );
-                add( ch_panel );
-                break;
             case Configuration.write_events:
                 _show_events = new JCheckBox( title );
                 addJCheckBox( getShowEventsCb(), ch_panel );
@@ -762,10 +757,6 @@ final class ControlPanel extends JPanel implements ActionListener {
         return _write_confidence;
     }
 
-    public JCheckBox getWriteConfidenceSDCb() {
-        return _write_confidence_sd;
-    }
-
     private void init() {
         _draw_phylogram = new ArrayList<Boolean>();
         setSpeciesColors( new HashMap<String, Color>() );
@@ -824,10 +815,6 @@ final class ControlPanel extends JPanel implements ActionListener {
         return ( ( getWriteConfidenceCb() != null ) && getWriteConfidenceCb().isSelected() );
     }
 
-    boolean isShowConfidenceSDValues() {
-        return ( ( getWriteConfidenceSDCb() != null ) && getWriteConfidenceSDCb().isSelected() );
-    }
-
     boolean isShowDomainArchitectures() {
         return ( ( _show_domain_architectures != null ) && _show_domain_architectures.isSelected() );
     }
@@ -1054,11 +1041,6 @@ final class ControlPanel extends JPanel implements ActionListener {
                     getWriteConfidenceCb().setSelected( state );
                 }
                 break;
-            case Configuration.write_confidence_values_sd:
-                if ( getWriteConfidenceSDCb() != null ) {
-                    getWriteConfidenceSDCb().setSelected( state );
-                }
-                break;
             case Configuration.write_events:
                 if ( getShowEventsCb() != null ) {
                     getShowEventsCb().setSelected( state );
@@ -1603,10 +1585,6 @@ final class ControlPanel extends JPanel implements ActionListener {
                          _configuration.getDisplayTitle( Configuration.write_confidence_values ) );
             setCheckbox( Configuration.write_confidence_values,
                          _configuration.doCheckOption( Configuration.write_confidence_values ) );
-            addCheckbox( Configuration.write_confidence_values_sd,
-                         _configuration.getDisplayTitle( Configuration.write_confidence_values_sd ) );
-            setCheckbox( Configuration.write_confidence_values_sd,
-                         _configuration.doCheckOption( Configuration.write_confidence_values_sd ) );
         }
         if ( _configuration.doDisplayOption( Configuration.write_events ) ) {
             addCheckbox( Configuration.write_events, _configuration.getDisplayTitle( Configuration.write_events ) );
@@ -1807,8 +1785,15 @@ final class ControlPanel extends JPanel implements ActionListener {
     void uncollapseAll( final TreePanel tp ) {
         final Phylogeny t = tp.getPhylogeny();
         if ( ( t != null ) && !t.isEmpty() ) {
-            t.setAllNodesToNotCollapse();
+            for( final PhylogenyNodeIterator iter = t.iteratorPreorder(); iter.hasNext(); ) {
+                final PhylogenyNode node = iter.next();
+                node.setCollapse( false );
+            }
+            tp.resetNodeIdToDistToLeafMap();
+            tp.updateSetOfCollapsedExternalNodes( t );
             t.recalculateNumberOfExternalDescendants( false );
+            tp.setNodeInPreorderToNull();
+            t.hashIDs();
             showWhole();
         }
     }