JAL-2797 added constructor including embedded/standalone boolean
[jalview.git] / forester / java / src / org / forester / archaeopteryx / MainFrameApplication.java
index fd79734..9a9c233 100644 (file)
@@ -57,6 +57,8 @@ import javax.swing.UnsupportedLookAndFeelException;
 import javax.swing.WindowConstants;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
+import javax.swing.event.InternalFrameAdapter;
+import javax.swing.event.InternalFrameEvent;
 
 import org.forester.analysis.TaxonomyDataManager;
 import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE;
@@ -77,7 +79,6 @@ import org.forester.io.parsers.nhx.NHXParser;
 import org.forester.io.parsers.nhx.NHXParser.TAXONOMY_EXTRACTION;
 import org.forester.io.parsers.phyloxml.PhyloXmlDataFormatException;
 import org.forester.io.parsers.phyloxml.PhyloXmlParser;
-import org.forester.io.parsers.phyloxml.PhyloXmlUtil;
 import org.forester.io.parsers.tol.TolParser;
 import org.forester.io.parsers.util.ParserUtils;
 import org.forester.io.writers.SequenceWriter;
@@ -103,8 +104,8 @@ import org.forester.util.ForesterUtil;
 
 public final class MainFrameApplication extends MainFrame {
 
-    private final static int             FRAME_X_SIZE                    = 800;
-    private final static int             FRAME_Y_SIZE                    = 800;
+    private final static int             FRAME_X_SIZE                    = 900;
+    private final static int             FRAME_Y_SIZE                    = 900;
     // Filters for the file-open dialog (classes defined in this file)
     private static final long            serialVersionUID                = -799735726778865234L;
     private static final boolean         PREPROCESS_TREES                = false;
@@ -162,10 +163,11 @@ public final class MainFrameApplication extends MainFrame {
         setSize( MainFrameApplication.FRAME_X_SIZE, MainFrameApplication.FRAME_Y_SIZE );
         // The window listener
         setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
-        addWindowListener( new WindowAdapter() {
+        addFrameListener( new FrameAdapter() {
 
             @Override
-            public void windowClosing( final WindowEvent e ) {
+            public void FrameClosing () {
+             
                 exit();
             }
         } );
@@ -181,15 +183,18 @@ public final class MainFrameApplication extends MainFrame {
         _contentpane.repaint();
     }
 
+
     private MainFrameApplication( final Phylogeny[] phys, final Configuration config, final String title ) {
         this( phys, config, title, null );
     }
-
-    private MainFrameApplication( final Phylogeny[] phys,
+    
+    private MainFrameApplication(final Phylogeny[] phys,
                                   final Configuration config,
                                   final String title,
-                                  final File current_dir ) {
-        super();
+                                  final File current_dir,
+                                  final boolean isEmbedded) {
+        super(isEmbedded);
         _configuration = config;
         if ( _configuration == null ) {
             throw new IllegalArgumentException( "configuration is null" );
@@ -303,41 +308,40 @@ public final class MainFrameApplication extends MainFrame {
         //        } );
         // The window listener
         setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
-        addWindowListener( new WindowAdapter() {
+        addFrameListener( new FrameAdapter() {
 
             @Override
-            public void windowClosing( final WindowEvent e ) {
+            public void FrameClosing(  ) {
+                if (MainFrameApplication.this.getParent() == null) {
                 if ( isUnsavedDataPresent() ) {
-                    final int r = JOptionPane.showConfirmDialog( null,
-                                                                 "Exit despite potentially unsaved changes?",
-                                                                 "Exit?",
+                    final int r = JOptionPane.showConfirmDialog( _mainpanel,
+                                                                 "Close Archaeopteryx despite potentially unsaved changes?",
+                                                                 "Close viewer?",
                                                                  JOptionPane.YES_NO_OPTION );
                     if ( r != JOptionPane.YES_OPTION ) {
                         return;
                     }
                 }
                 else {
-                    final int r = JOptionPane.showConfirmDialog( null,
-                                                                 "Exit Archaeopteryx?",
-                                                                 "Exit?",
-                                                                 JOptionPane.YES_NO_OPTION );
+                    final int r = JOptionPane
+                            .showConfirmDialog( null, "Exit Archaeopteryx?", "Exit?", JOptionPane.YES_NO_OPTION );
                     if ( r != JOptionPane.YES_OPTION ) {
                         return;
                     }
-                }
+                }}
                 exit();
-            }
-        } );
+            
+        } });
         // The component listener
         addComponentListener( new ComponentAdapter() {
 
             @Override
             public void componentResized( final ComponentEvent e ) {
                 if ( _mainpanel.getCurrentTreePanel() != null ) {
-                    _mainpanel.getCurrentTreePanel().calcParametersForPainting( _mainpanel.getCurrentTreePanel()
-                                                                                .getWidth(),
-                                                                                _mainpanel.getCurrentTreePanel()
-                                                                                .getHeight() );
+                    _mainpanel.getCurrentTreePanel()
+                            .calcParametersForPainting( _mainpanel.getCurrentTreePanel().getWidth(),
+                                                        _mainpanel.getCurrentTreePanel().getHeight() );
                 }
             }
         } );
@@ -354,6 +358,14 @@ public final class MainFrameApplication extends MainFrame {
         // ...and its children
         _contentpane.repaint();
         System.gc();
+    
+    }
+
+    private MainFrameApplication( final Phylogeny[] phys,
+                                  final Configuration config,
+                                  final String title,
+                                  final File current_dir ) {
+        this(phys,config,title,current_dir,false);
     }
 
     private MainFrameApplication( final Phylogeny[] phys, final String config_file, final String title ) {
@@ -436,6 +448,7 @@ public final class MainFrameApplication extends MainFrame {
                 }
                 collapseBelowThreshold();
             }
+           
             else if ( o == _collapse_below_branch_length ) {
                 if ( isSubtreeDisplayed() ) {
                     return;
@@ -518,12 +531,12 @@ public final class MainFrameApplication extends MainFrame {
                     msa = FastaParser.parseMsa( is );
                 }
                 else {
-                    msa = GeneralMsaParser.parse( is );
+                    msa = GeneralMsaParser.parseMsa( is );
                 }
             }
             catch ( final MsaFormatException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Multiple sequence alignment format error",
                                                JOptionPane.ERROR_MESSAGE );
@@ -531,7 +544,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             catch ( final IOException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Failed to read multiple sequence alignment",
                                                JOptionPane.ERROR_MESSAGE );
@@ -539,7 +552,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             catch ( final IllegalArgumentException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Unexpected error during reading of multiple sequence alignment",
                                                JOptionPane.ERROR_MESSAGE );
@@ -548,28 +561,28 @@ public final class MainFrameApplication extends MainFrame {
             catch ( final Exception e ) {
                 setArrowCursor();
                 e.printStackTrace();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Unexpected error during reading of multiple sequence alignment",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( ( msa == null ) || ( msa.getNumberOfSequences() < 1 ) ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Multiple sequence alignment is empty",
                                                "Illegal Multiple Sequence Alignment",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( msa.getNumberOfSequences() < 4 ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Multiple sequence alignment needs to contain at least 3 sequences",
                                                "Illegal multiple sequence alignment",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( msa.getLength() < 2 ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Multiple sequence alignment needs to contain at least 2 residues",
                                                "Illegal multiple sequence alignment",
                                                JOptionPane.ERROR_MESSAGE );
@@ -610,7 +623,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             catch ( final MsaFormatException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Multiple sequence file format error",
                                                JOptionPane.ERROR_MESSAGE );
@@ -618,7 +631,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             catch ( final IOException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Failed to read multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
@@ -626,7 +639,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             catch ( final IllegalArgumentException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Unexpected error during reading of multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
@@ -635,21 +648,21 @@ public final class MainFrameApplication extends MainFrame {
             catch ( final Exception e ) {
                 setArrowCursor();
                 e.printStackTrace();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Unexpected error during reading of multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( ( seqs == null ) || ( seqs.size() < 1 ) ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Multiple sequence file is empty",
                                                "Illegal multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( seqs.size() < 4 ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Multiple sequence file needs to contain at least 3 sequences",
                                                "Illegal multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
@@ -670,7 +683,7 @@ public final class MainFrameApplication extends MainFrame {
 
     private void addExpressionValuesFromFile() {
         if ( ( getCurrentTreePanel() == null ) || ( getCurrentTreePanel().getPhylogeny() == null ) ) {
-            JOptionPane.showMessageDialog( this,
+            JOptionPane.showMessageDialog( getThisFrame(),
                                            "Need to load evolutionary tree first",
                                            "Can Not Read Expression Values",
                                            JOptionPane.WARNING_MESSAGE );
@@ -694,21 +707,21 @@ public final class MainFrameApplication extends MainFrame {
                 }
             }
             catch ( final IOException e ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getMessage(),
                                                "Could Not Read Expression Value Table",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( t.getNumberOfColumns() < 2 ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Table contains " + t.getNumberOfColumns() + " column(s)",
                                                "Problem with Expression Value Table",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( t.getNumberOfRows() < 1 ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Table contains zero rows",
                                                "Problem with Expression Value Table",
                                                JOptionPane.ERROR_MESSAGE );
@@ -716,11 +729,11 @@ public final class MainFrameApplication extends MainFrame {
             }
             final Phylogeny phy = getCurrentTreePanel().getPhylogeny();
             if ( t.getNumberOfRows() != phy.getNumberOfExternalNodes() ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Table contains " + t.getNumberOfRows() + " rows, but tree contains "
                                                        + phy.getNumberOfExternalNodes() + " external nodes",
-                                                       "Warning",
-                                                       JOptionPane.WARNING_MESSAGE );
+                                               "Warning",
+                                               JOptionPane.WARNING_MESSAGE );
             }
             final DescriptiveStatistics stats = new BasicDescriptiveStatistics();
             int not_found = 0;
@@ -733,11 +746,10 @@ public final class MainFrameApplication extends MainFrame {
                         row = t.findRow( node_name );
                     }
                     catch ( final IllegalArgumentException e ) {
-                        JOptionPane
-                        .showMessageDialog( this,
-                                            e.getMessage(),
-                                            "Error Mapping Node Identifiers to Expression Value Identifiers",
-                                            JOptionPane.ERROR_MESSAGE );
+                        JOptionPane.showMessageDialog( getThisFrame(),
+                                                       e.getMessage(),
+                                                       "Error Mapping Node Identifiers to Expression Value Identifiers",
+                                                       JOptionPane.ERROR_MESSAGE );
                         return;
                     }
                     if ( row < 0 ) {
@@ -753,9 +765,9 @@ public final class MainFrameApplication extends MainFrame {
                             d = Double.parseDouble( t.getValueAsString( col, row ) );
                         }
                         catch ( final NumberFormatException e ) {
-                            JOptionPane.showMessageDialog( this,
+                            JOptionPane.showMessageDialog( getThisFrame(),
                                                            "Could not parse \"" + t.getValueAsString( col, row )
-                                                           + "\" into a decimal value",
+                                                                   + "\" into a decimal value",
                                                            "Issue with Expression Value Table",
                                                            JOptionPane.ERROR_MESSAGE );
                             return;
@@ -764,17 +776,17 @@ public final class MainFrameApplication extends MainFrame {
                         l.add( d );
                     }
                     if ( !l.isEmpty() ) {
-                        if ( node.getNodeData().getProperties() != null ) {
-                            node.getNodeData().getProperties()
-                            .removePropertiesWithGivenReferencePrefix( PhyloXmlUtil.VECTOR_PROPERTY_REF );
-                        }
+                       
                         node.getNodeData().setVector( l );
                     }
                 }
             }
             if ( not_found > 0 ) {
-                JOptionPane.showMessageDialog( this, "Could not fine expression values for " + not_found
-                                               + " external node(s)", "Warning", JOptionPane.WARNING_MESSAGE );
+                JOptionPane
+                        .showMessageDialog( getThisFrame(),
+                                            "Could not fine expression values for " + not_found + " external node(s)",
+                                            "Warning",
+                                            JOptionPane.WARNING_MESSAGE );
             }
             getCurrentTreePanel().setStatisticsForExpressionValues( stats );
         }
@@ -782,7 +794,7 @@ public final class MainFrameApplication extends MainFrame {
 
     private void addSequencesFromFile() {
         if ( ( getCurrentTreePanel() == null ) || ( getCurrentTreePanel().getPhylogeny() == null ) ) {
-            JOptionPane.showMessageDialog( this,
+            JOptionPane.showMessageDialog( getThisFrame(),
                                            "Need to load evolutionary tree first",
                                            "Can Not Read Sequences",
                                            JOptionPane.WARNING_MESSAGE );
@@ -803,13 +815,13 @@ public final class MainFrameApplication extends MainFrame {
                     seqs = FastaParser.parse( fis2 );
                     try {
                         fis2.close();
-                     }
-                     catch ( final Exception e ) {
-                         // Ignore.
-                     }
+                    }
+                    catch ( final Exception e ) {
+                        // Ignore.
+                    }
                 }
                 else {
-                    JOptionPane.showMessageDialog( this,
+                    JOptionPane.showMessageDialog( getThisFrame(),
                                                    "Format does not appear to be Fasta",
                                                    "Multiple sequence file format error",
                                                    JOptionPane.ERROR_MESSAGE );
@@ -819,12 +831,12 @@ public final class MainFrameApplication extends MainFrame {
                     fis1.close();
                 }
                 catch ( final Exception e ) {
-                     // Ignore.
+                    // Ignore.
                 }
             }
             catch ( final MsaFormatException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Multiple sequence file format error",
                                                JOptionPane.ERROR_MESSAGE );
@@ -832,7 +844,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             catch ( final IOException e ) {
                 setArrowCursor();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Failed to read multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
@@ -841,14 +853,14 @@ public final class MainFrameApplication extends MainFrame {
             catch ( final Exception e ) {
                 setArrowCursor();
                 e.printStackTrace();
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "Unexpected error during reading of multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
                 return;
             }
             if ( ( seqs == null ) || ( seqs.size() < 1 ) ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Multiple sequence file is empty",
                                                "Empty multiple sequence file",
                                                JOptionPane.ERROR_MESSAGE );
@@ -878,7 +890,7 @@ public final class MainFrameApplication extends MainFrame {
                         nodes = phy.getNodes( seq_name );
                     }
                     if ( nodes.size() > 1 ) {
-                        JOptionPane.showMessageDialog( this,
+                        JOptionPane.showMessageDialog( getThisFrame(),
                                                        "Sequence name \"" + seq_name + "\" is not unique",
                                                        "Sequence name not unique",
                                                        JOptionPane.ERROR_MESSAGE );
@@ -896,8 +908,11 @@ public final class MainFrameApplication extends MainFrame {
                             nodes = phy.getNodes( seq_name_split );
                         }
                         if ( nodes.size() > 1 ) {
-                            JOptionPane.showMessageDialog( this, "Split sequence name \"" + seq_name_split
-                                                           + "\" is not unique", "Sequence name not unique", JOptionPane.ERROR_MESSAGE );
+                            JOptionPane.showMessageDialog( getThisFrame(),
+                                                           "Split sequence name \"" + seq_name_split
+                                                                   + "\" is not unique",
+                                                           "Sequence name not unique",
+                                                           JOptionPane.ERROR_MESSAGE );
                             setArrowCursor();
                             return;
                         }
@@ -935,20 +950,24 @@ public final class MainFrameApplication extends MainFrame {
                             + " external nodes now have a molecular sequence attached to them.";
                 }
                 if ( ( attached_counter == total_counter ) && ( ext_nodes == ext_nodes_with_seq ) ) {
-                    JOptionPane.showMessageDialog( this,
+                    JOptionPane.showMessageDialog( getThisFrame(),
                                                    "Attached all " + total_counter + " sequences to tree nodes.\n" + s,
                                                    "All sequences attached",
                                                    JOptionPane.INFORMATION_MESSAGE );
                 }
                 else {
-                    JOptionPane.showMessageDialog( this, "Attached " + attached_counter
-                                                   + " sequences out of a total of " + total_counter + " sequences.\n" + s, attached_counter
-                                                   + " sequences attached", JOptionPane.WARNING_MESSAGE );
+                    JOptionPane.showMessageDialog( getThisFrame(),
+                                                   "Attached " + attached_counter + " sequences out of a total of "
+                                                           + total_counter + " sequences.\n" + s,
+                                                   attached_counter + " sequences attached",
+                                                   JOptionPane.WARNING_MESSAGE );
                 }
             }
             else {
-                JOptionPane.showMessageDialog( this, "No maching tree node for any of the " + total_counter
-                                               + " sequences", "Could not attach any sequences", JOptionPane.ERROR_MESSAGE );
+                JOptionPane.showMessageDialog( getThisFrame(),
+                                               "No maching tree node for any of the " + total_counter + " sequences",
+                                               "Could not attach any sequences",
+                                               JOptionPane.ERROR_MESSAGE );
             }
         }
     }
@@ -956,7 +975,7 @@ public final class MainFrameApplication extends MainFrame {
     private void closeCurrentPane() {
         if ( getMainPanel().getCurrentTreePanel() != null ) {
             if ( getMainPanel().getCurrentTreePanel().isEdited() ) {
-                final int r = JOptionPane.showConfirmDialog( this,
+                final int r = JOptionPane.showConfirmDialog( getThisFrame(),
                                                              "Close tab despite potentially unsaved changes?",
                                                              "Close Tab?",
                                                              JOptionPane.YES_NO_OPTION );
@@ -969,7 +988,7 @@ public final class MainFrameApplication extends MainFrame {
         }
     }
 
-    private void collapse( final Phylogeny phy ) {
+    private void collapseBelowThreshold( final Phylogeny phy ) {
         final PhylogenyNodeIterator it = phy.iteratorPostorder();
         final List<PhylogenyNode> to_be_removed = new ArrayList<PhylogenyNode>();
         double min_support = Double.MAX_VALUE;
@@ -1014,17 +1033,23 @@ public final class MainFrameApplication extends MainFrame {
                 repaint();
             }
             if ( to_be_removed.size() > 0 ) {
-                JOptionPane.showMessageDialog( this, "Collapsed " + to_be_removed.size()
-                                               + " branches with\nconfidence values below " + getMinNotCollapseConfidenceValue(), "Collapsed "
-                                                       + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );
+                JOptionPane.showMessageDialog( getThisFrame(),
+                                               "Collapsed " + to_be_removed.size()
+                                                       + " branches with\nconfidence values below "
+                                                       + getMinNotCollapseConfidenceValue(),
+                                               "Collapsed " + to_be_removed.size() + " branches",
+                                               JOptionPane.INFORMATION_MESSAGE );
             }
             else {
-                JOptionPane.showMessageDialog( this, "No branch collapsed,\nminimum confidence value per branch is "
-                        + min_support, "No branch collapsed", JOptionPane.INFORMATION_MESSAGE );
+                JOptionPane.showMessageDialog( getThisFrame(),
+                                               "No branch collapsed,\nminimum confidence value per branch is "
+                                                       + min_support,
+                                               "No branch collapsed",
+                                               JOptionPane.INFORMATION_MESSAGE );
             }
         }
         else {
-            JOptionPane.showMessageDialog( this,
+            JOptionPane.showMessageDialog( getThisFrame(),
                                            "No branch collapsed because no confidence values present",
                                            "No confidence values present",
                                            JOptionPane.INFORMATION_MESSAGE );
@@ -1035,14 +1060,13 @@ public final class MainFrameApplication extends MainFrame {
         if ( getCurrentTreePanel() != null ) {
             final Phylogeny phy = getCurrentTreePanel().getPhylogeny();
             if ( ( phy != null ) && !phy.isEmpty() ) {
-                final String s = ( String ) JOptionPane
-                        .showInputDialog( this,
-                                          "Please enter the minimum branch length value\n",
-                                          "Minimal Branch Length Value",
-                                          JOptionPane.QUESTION_MESSAGE,
-                                          null,
-                                          null,
-                                          getMinNotCollapseBlValue() );
+                final String s = ( String ) JOptionPane.showInputDialog( getThisFrame(),
+                                                                         "Please enter the minimum branch length value\n",
+                                                                         "Minimal Branch Length Value",
+                                                                         JOptionPane.QUESTION_MESSAGE,
+                                                                         null,
+                                                                         null,
+                                                                         getMinNotCollapseBlValue() );
                 if ( !ForesterUtil.isEmpty( s ) ) {
                     boolean success = true;
                     double m = 0.0;
@@ -1071,7 +1095,7 @@ public final class MainFrameApplication extends MainFrame {
         if ( getCurrentTreePanel() != null ) {
             final Phylogeny phy = getCurrentTreePanel().getPhylogeny();
             if ( ( phy != null ) && !phy.isEmpty() ) {
-                final String s = ( String ) JOptionPane.showInputDialog( this,
+                final String s = ( String ) JOptionPane.showInputDialog( getThisFrame(),
                                                                          "Please enter the minimum confidence value\n",
                                                                          "Minimal Confidence Value",
                                                                          JOptionPane.QUESTION_MESSAGE,
@@ -1095,7 +1119,7 @@ public final class MainFrameApplication extends MainFrame {
                     }
                     if ( success && ( m >= 0.0 ) ) {
                         setMinNotCollapseConfidenceValue( m );
-                        collapse( phy );
+                        collapseBelowThreshold( phy );
                     }
                 }
             }
@@ -1141,19 +1165,22 @@ public final class MainFrameApplication extends MainFrame {
                 repaint();
             }
             if ( to_be_removed.size() > 0 ) {
-                JOptionPane.showMessageDialog( this, "Collapsed " + to_be_removed.size()
-                                               + " branches with\nbranch length values below " + getMinNotCollapseBlValue(), "Collapsed "
-                                                       + to_be_removed.size() + " branches", JOptionPane.INFORMATION_MESSAGE );
+                JOptionPane.showMessageDialog( getThisFrame(),
+                                               "Collapsed " + to_be_removed.size()
+                                                       + " branches with\nbranch length values below "
+                                                       + getMinNotCollapseBlValue(),
+                                               "Collapsed " + to_be_removed.size() + " branches",
+                                               JOptionPane.INFORMATION_MESSAGE );
             }
             else {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "No branch collapsed,\nminimum branch length is " + min_bl,
                                                "No branch collapsed",
                                                JOptionPane.INFORMATION_MESSAGE );
             }
         }
         else {
-            JOptionPane.showMessageDialog( this,
+            JOptionPane.showMessageDialog( getThisFrame(),
                                            "No branch collapsed because no branch length values present",
                                            "No branch length values present",
                                            JOptionPane.INFORMATION_MESSAGE );
@@ -1167,7 +1194,7 @@ public final class MainFrameApplication extends MainFrame {
                 xml_parser = PhyloXmlParser.createPhyloXmlParserXsdValidating();
             }
             catch ( final Exception e ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                e.getLocalizedMessage(),
                                                "failed to create validating XML parser",
                                                JOptionPane.WARNING_MESSAGE );
@@ -1189,11 +1216,12 @@ public final class MainFrameApplication extends MainFrame {
                 if ( getMsa() != null ) {
                     final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getMsa(),
                                                                                     getPhylogeneticInferenceOptions()
-                                                                                    .copy(), this );
+                                                                                            .copy(),
+                                                                                    this );
                     new Thread( inferrer ).start();
                 }
                 else {
-                    JOptionPane.showMessageDialog( this,
+                    JOptionPane.showMessageDialog( getThisFrame(),
                                                    "No multiple sequence alignment selected",
                                                    "Phylogenetic Inference Not Launched",
                                                    JOptionPane.WARNING_MESSAGE );
@@ -1203,11 +1231,12 @@ public final class MainFrameApplication extends MainFrame {
                 if ( getSeqs() != null ) {
                     final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getSeqs(),
                                                                                     getPhylogeneticInferenceOptions()
-                                                                                    .copy(), this );
+                                                                                            .copy(),
+                                                                                    this );
                     new Thread( inferrer ).start();
                 }
                 else {
-                    JOptionPane.showMessageDialog( this,
+                    JOptionPane.showMessageDialog( getThisFrame(),
                                                    "No input sequences selected",
                                                    "Phylogenetic Inference Not Launched",
                                                    JOptionPane.WARNING_MESSAGE );
@@ -1256,24 +1285,23 @@ public final class MainFrameApplication extends MainFrame {
                     String all = "all ";
                     if ( counter_failed > 0 ) {
                         all = "";
-                        failed = "\nCould not extract taxonomic data for " + counter_failed
-                                + " named external nodes:\n" + sb_failed;
+                        failed = "\nCould not extract taxonomic data for " + counter_failed + " named external nodes:\n"
+                                + sb_failed;
                     }
-                    JOptionPane.showMessageDialog( this,
+                    JOptionPane.showMessageDialog( getThisFrame(),
                                                    "Extracted taxonomic data from " + all + counter
-                                                   + " named external nodes:\n" + sb.toString() + failed,
+                                                           + " named external nodes:\n" + sb.toString() + failed,
                                                    "Taxonomic Data Extraction Completed",
                                                    counter_failed > 0 ? JOptionPane.WARNING_MESSAGE
                                                            : JOptionPane.INFORMATION_MESSAGE );
                 }
                 else {
-                    JOptionPane
-                    .showMessageDialog( this,
-                                        "Could not extract any taxonomic data.\nMaybe node names are empty\n"
-                                                + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"
-                                                + "or nodes already have taxonomic data?\n",
-                                                "No Taxonomic Data Extracted",
-                                                JOptionPane.ERROR_MESSAGE );
+                    JOptionPane.showMessageDialog( getThisFrame(),
+                                                   "Could not extract any taxonomic data.\nMaybe node names are empty\n"
+                                                           + "or not in the forms \"XYZ_CAEEL\", \"XYZ_6239\", or \"XYZ_Caenorhabditis_elegans\"\n"
+                                                           + "or nodes already have taxonomic data?\n",
+                                                   "No Taxonomic Data Extracted",
+                                                   JOptionPane.ERROR_MESSAGE );
                 }
             }
         }
@@ -1308,8 +1336,9 @@ public final class MainFrameApplication extends MainFrame {
         if ( getCurrentTreePanel() != null ) {
             final Phylogeny phy = getCurrentTreePanel().getPhylogeny();
             if ( ( phy != null ) && !phy.isEmpty() ) {
-                PhylogenyMethods
-                .transferNodeNameToField( phy, PhylogenyMethods.PhylogenyNodeField.SEQUENCE_NAME, false );
+                PhylogenyMethods.transferNodeNameToField( phy,
+                                                          PhylogenyMethods.PhylogenyNodeField.SEQUENCE_NAME,
+                                                          false );
             }
         }
     }
@@ -1336,14 +1365,9 @@ public final class MainFrameApplication extends MainFrame {
         _mainpanel.getControlPanel().showWhole();
         _mainpanel.getCurrentTreePanel().setPhylogenyGraphicsType( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
         _mainpanel.getOptions().setPhylogenyGraphicsType( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
-        if ( getMainPanel().getMainFrame() == null ) {
-            // Must be "E" applet version.
-            ( ( ArchaeopteryxE ) ( ( MainPanelApplets ) getMainPanel() ).getApplet() )
-            .setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
-        }
-        else {
-            getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
-        }
+       
+        getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR );
+       
         activateSaveAllIfNeeded();
         System.gc();
     }
@@ -1484,8 +1508,9 @@ public final class MainFrameApplication extends MainFrame {
                     else {
                         try {
                             final PhylogenyParser parser = ParserUtils
-                                    .createParserDependingOnFileType( file, getConfiguration()
-                                                                      .isValidatePhyloXmlAgainstSchema() );
+                                    .createParserDependingOnFileType( file,
+                                                                      getConfiguration()
+                                                                              .isValidatePhyloXmlAgainstSchema() );
                             if ( parser instanceof NexusPhylogeniesParser ) {
                                 final NexusPhylogeniesParser nex = ( NexusPhylogeniesParser ) parser;
                                 setSpecialOptionsForNexParser( nex );
@@ -1535,13 +1560,12 @@ public final class MainFrameApplication extends MainFrame {
                                                        getMainPanel() );
                         _mainpanel.getControlPanel().showWhole();
                         if ( nhx_or_nexus && one_desc ) {
-                            JOptionPane
-                            .showMessageDialog( this,
-                                                "One or more trees contain (a) node(s) with one descendant, "
-                                                        + ForesterUtil.LINE_SEPARATOR
-                                                        + "possibly indicating illegal parentheses within node names.",
-                                                        "Warning: Possible Error in New Hampshire Formatted Data",
-                                                        JOptionPane.WARNING_MESSAGE );
+                            JOptionPane.showMessageDialog( getThisFrame(),
+                                                           "One or more trees contain (a) node(s) with one descendant, "
+                                                                   + ForesterUtil.LINE_SEPARATOR
+                                                                   + "possibly indicating illegal parentheses within node names.",
+                                                           "Warning: Possible Error in New Hampshire Formatted Data",
+                                                           JOptionPane.WARNING_MESSAGE );
                         }
                     }
                 }
@@ -1564,8 +1588,8 @@ public final class MainFrameApplication extends MainFrame {
         if ( ( file != null ) && ( result == JFileChooser.APPROVE_OPTION ) ) {
             if ( _open_filechooser_for_species_tree.getFileFilter() == MainFrame.xmlfilter ) {
                 try {
-                    final Phylogeny[] trees = PhylogenyMethods.readPhylogenies( PhyloXmlParser
-                                                                                .createPhyloXmlParserXsdValidating(), file );
+                    final Phylogeny[] trees = PhylogenyMethods
+                            .readPhylogenies( PhyloXmlParser.createPhyloXmlParserXsdValidating(), file );
                     t = trees[ 0 ];
                 }
                 catch ( final Exception e ) {
@@ -1586,8 +1610,8 @@ public final class MainFrameApplication extends MainFrame {
             // "*.*":
             else {
                 try {
-                    final Phylogeny[] trees = PhylogenyMethods.readPhylogenies( PhyloXmlParser
-                                                                                .createPhyloXmlParserXsdValidating(), file );
+                    final Phylogeny[] trees = PhylogenyMethods
+                            .readPhylogenies( PhyloXmlParser.createPhyloXmlParserXsdValidating(), file );
                     t = trees[ 0 ];
                 }
                 catch ( final Exception e ) {
@@ -1598,7 +1622,7 @@ public final class MainFrameApplication extends MainFrame {
             if ( !exception && ( t != null ) && !t.isRooted() ) {
                 exception = true;
                 t = null;
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Species tree is not rooted",
                                                "Species tree not loaded",
                                                JOptionPane.ERROR_MESSAGE );
@@ -1610,23 +1634,22 @@ public final class MainFrameApplication extends MainFrame {
                     if ( !node.getNodeData().isHasTaxonomy() ) {
                         exception = true;
                         t = null;
-                        JOptionPane
-                        .showMessageDialog( this,
-                                            "Species tree contains external node(s) without taxonomy information",
-                                            "Species tree not loaded",
-                                            JOptionPane.ERROR_MESSAGE );
+                        JOptionPane.showMessageDialog( getThisFrame(),
+                                                       "Species tree contains external node(s) without taxonomy information",
+                                                       "Species tree not loaded",
+                                                       JOptionPane.ERROR_MESSAGE );
                         break;
                     }
                     else {
                         if ( tax_set.contains( node.getNodeData().getTaxonomy() ) ) {
                             exception = true;
                             t = null;
-                            JOptionPane.showMessageDialog( this,
-                                                           "Taxonomy ["
-                                                                   + node.getNodeData().getTaxonomy().asSimpleText()
-                                                                   + "] is not unique in species tree",
-                                                                   "Species tree not loaded",
-                                                                   JOptionPane.ERROR_MESSAGE );
+                            JOptionPane
+                                    .showMessageDialog( getThisFrame(),
+                                                        "Taxonomy [" + node.getNodeData().getTaxonomy().asSimpleText()
+                                                                + "] is not unique in species tree",
+                                                        "Species tree not loaded",
+                                                        JOptionPane.ERROR_MESSAGE );
                             break;
                         }
                         else {
@@ -1637,7 +1660,7 @@ public final class MainFrameApplication extends MainFrame {
             }
             if ( !exception && ( t != null ) ) {
                 setSpeciesTree( t );
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Species tree successfully loaded",
                                                "Species tree loaded",
                                                JOptionPane.INFORMATION_MESSAGE );
@@ -1705,7 +1728,7 @@ public final class MainFrameApplication extends MainFrame {
         _file_jmenu.addSeparator();
         final WebservicesManager webservices_manager = WebservicesManager.getInstance();
         _load_phylogeny_from_webservice_menu_items = new JMenuItem[ webservices_manager
-                                                                    .getAvailablePhylogeniesWebserviceClients().size() ];
+                .getAvailablePhylogeniesWebserviceClients().size() ];
         for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {
             final PhylogeniesWebserviceClient client = webservices_manager.getAvailablePhylogeniesWebserviceClient( i );
             _load_phylogeny_from_webservice_menu_items[ i ] = new JMenuItem( client.getMenuName() );
@@ -1723,7 +1746,8 @@ public final class MainFrameApplication extends MainFrame {
         _save_all_item.setEnabled( false );
         _file_jmenu.addSeparator();
         _file_jmenu.add( _write_to_pdf_item = new JMenuItem( "Export to PDF file ..." ) );
-        if ( AptxUtil.canWriteFormat( "tif" ) || AptxUtil.canWriteFormat( "tiff" ) || AptxUtil.canWriteFormat( "TIF" ) ) {
+        if ( AptxUtil.canWriteFormat( "tif" ) || AptxUtil.canWriteFormat( "tiff" )
+                || AptxUtil.canWriteFormat( "TIF" ) ) {
             _file_jmenu.add( _write_to_tif_item = new JMenuItem( "Export to TIFF file..." ) );
         }
         _file_jmenu.add( _write_to_png_item = new JMenuItem( "Export to PNG file..." ) );
@@ -1743,8 +1767,9 @@ public final class MainFrameApplication extends MainFrame {
         _file_jmenu.addSeparator();
         _file_jmenu.add( _exit_item = new JMenuItem( "Exit" ) );
         customizeJMenuItem( _open_item );
-        _open_item
-        .setFont( new Font( _open_item.getFont().getFontName(), Font.BOLD, _open_item.getFont().getSize() + 4 ) );
+        _open_item.setFont( new Font( _open_item.getFont().getFontName(),
+                                      Font.BOLD,
+                                      _open_item.getFont().getSize() + 4 ) );
         customizeJMenuItem( _open_url_item );
         for( int i = 0; i < webservices_manager.getAvailablePhylogeniesWebserviceClients().size(); ++i ) {
             customizeJMenuItem( _load_phylogeny_from_webservice_menu_items[ i ] );
@@ -1774,11 +1799,13 @@ public final class MainFrameApplication extends MainFrame {
             public void stateChanged( final ChangeEvent e ) {
                 MainFrame.setOvPlacementColorChooseMenuItem( _overview_placment_mi, getOptions() );
                 MainFrame.setTextColorChooseMenuItem( _switch_colors_mi, getCurrentTreePanel() );
-                MainFrame
-                .setTextMinSupportMenuItem( _choose_minimal_confidence_mi, getOptions(), getCurrentTreePanel() );
-                MainFrame.setTextForFontChooserMenuItem( _choose_font_mi, MainFrame
-                                                         .createCurrentFontDesc( getMainPanel().getTreeFontSet() ) );
-              //  MainFrame.setTextForGraphicsSizeChooserMenuItem( _print_size_mi, getOptions() );
+                MainFrame.setTextMinSupportMenuItem( _choose_minimal_confidence_mi,
+                                                     getOptions(),
+                                                     getCurrentTreePanel() );
+                MainFrame.setTextForFontChooserMenuItem( _choose_font_mi,
+                                                         MainFrame.createCurrentFontDesc( getMainPanel()
+                                                                 .getTreeFontSet() ) );
+                //  MainFrame.setTextForGraphicsSizeChooserMenuItem( _print_size_mi, getOptions() );
                 MainFrame.setTextForPdfLineWidthChooserMenuItem( _choose_pdf_width_mi, getOptions() );
                 MainFrame.setCycleNodeFillMenuItem( _cycle_node_fill_mi, getOptions() );
                 MainFrame.setCycleNodeShapeMenuItem( _cycle_node_shape_mi, getOptions() );
@@ -1795,24 +1822,37 @@ public final class MainFrameApplication extends MainFrame {
         } );
         _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( DISPLAY_SUBHEADER ), getConfiguration() ) );
         _options_jmenu
-        .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );
-        _options_jmenu.add( _uniform_cladograms_rbmi = new JRadioButtonMenuItem( MainFrame.UNIFORM_CLADOGRAMS_LABEL ) );
+                .add( _ext_node_dependent_cladogram_rbmi = new JRadioButtonMenuItem( MainFrame.NONUNIFORM_CLADOGRAMS_LABEL ) );
         _options_jmenu.add( _non_lined_up_cladograms_rbmi = new JRadioButtonMenuItem( NON_LINED_UP_CLADOGRAMS_LABEL ) );
         _radio_group_1 = new ButtonGroup();
         _radio_group_1.add( _ext_node_dependent_cladogram_rbmi );
-        _radio_group_1.add( _uniform_cladograms_rbmi );
-        _radio_group_1.add( _non_lined_up_cladograms_rbmi );
+         _radio_group_1.add( _non_lined_up_cladograms_rbmi );
         _options_jmenu.add( _show_overview_cbmi = new JCheckBoxMenuItem( SHOW_OVERVIEW_LABEL ) );
         _options_jmenu.add( _show_scale_cbmi = new JCheckBoxMenuItem( DISPLAY_SCALE_LABEL ) );
         _options_jmenu
-        .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );
+                .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) );
+        _options_jmenu
+                .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );
         _options_jmenu
-        .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) );
+                .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );
+      
         _options_jmenu
-        .add( _show_default_node_shapes_for_marked_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_MARKED ) );
-        _options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );
+        .add( _collapsed_with_average_height_cbmi = new JCheckBoxMenuItem( "Proportional Height of Collapsed Subtrees" ) );
+
+        
+        _options_jmenu
+        .add( _show_abbreviated_labels_for_collapsed_nodes_cbmi = new JCheckBoxMenuItem( "Add Abbreviated Labels to Collapsed Subtrees" ) );
+
+     
+        
+        _options_jmenu
+                .add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );
+        
+       
+        
         if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {
-            _options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );
+            _options_jmenu
+                    .add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );
             _options_jmenu.add( _show_domain_labels = new JCheckBoxMenuItem( MainFrame.SHOW_DOMAIN_LABELS_LABEL ) );
         }
         _options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( SHOW_ANN_REF_SOURCE_LABEL ) );
@@ -1841,40 +1881,40 @@ public final class MainFrameApplication extends MainFrame {
         _options_jmenu.add( _search_with_regex_cbmi = new JCheckBoxMenuItem( MainFrame.SEARCH_REGEX_LABEL ) );
         _search_with_regex_cbmi.setToolTipText( MainFrame.SEARCH_WITH_REGEX_TIP );
         _options_jmenu.add( _inverse_search_result_cbmi = new JCheckBoxMenuItem( INVERSE_SEARCH_RESULT_LABEL ) );
-        _options_jmenu.add( _color_all_found_nodes_when_coloring_subtree_cbmi = new JCheckBoxMenuItem( "Colorize All Found Nodes When Colorizing Subtree(s)" ) ); 
+        _options_jmenu
+                .add( _color_all_found_nodes_when_coloring_subtree_cbmi = new JCheckBoxMenuItem( "Colorize All Found Nodes When Colorizing Subtree(s)" ) );
         _options_jmenu.addSeparator();
-        _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Graphics Export & Printing:" ),
-                                                      getConfiguration() ) );
+        _options_jmenu
+                .add( customizeMenuItemAsLabel( new JMenuItem( "Graphics Export & Printing:" ), getConfiguration() ) );
         _options_jmenu.add( _antialias_print_cbmi = new JCheckBoxMenuItem( "Antialias" ) );
         _options_jmenu.add( _print_black_and_white_cbmi = new JCheckBoxMenuItem( "Export in Black and White" ) );
-         _options_jmenu
-        .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );
+        _options_jmenu
+                .add( _graphics_export_visible_only_cbmi = new JCheckBoxMenuItem( "Limit to Visible ('Screenshot') for PNG, JPG, and GIF export" ) );
         _options_jmenu.add( _choose_pdf_width_mi = new JMenuItem( "" ) );
         _options_jmenu.addSeparator();
         _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/NHX/Nexus Read:" ), getConfiguration() ) );
         _options_jmenu
-        .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );
+                .add( _internal_number_are_confidence_for_nh_parsing_cbmi = new JCheckBoxMenuItem( "Internal Node Names are Confidence Values" ) );
         _options_jmenu.add( _replace_underscores_cbmi = new JCheckBoxMenuItem( "Replace Underscores with Spaces" ) );
-        _options_jmenu.add( _parse_beast_style_extended_nexus_tags_cbmi = new JCheckBoxMenuItem( "Parse BEAST-style extended Newick/Nexus tags" ) ); 
-        
-        _parse_beast_style_extended_nexus_tags_cbmi.setToolTipText( "to parse elements in the form of \"[&!color=#800080]\" in Newick/Nexus formatted trees" );
-        
-        
         _options_jmenu
-        .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );
+                .add( _parse_beast_style_extended_nexus_tags_cbmi = new JCheckBoxMenuItem( "Parse BEAST-style extended Newick/Nexus tags" ) );
+        _parse_beast_style_extended_nexus_tags_cbmi
+                .setToolTipText( "to parse elements in the form of \"[&!color=#800080]\" in Newick/Nexus formatted trees" );
+        _options_jmenu
+                .add( _allow_errors_in_distance_to_parent_cbmi = new JCheckBoxMenuItem( "Ignore Distance Values Format Errors" ) );
         _options_jmenu.add( _extract_taxonomy_no_rbmi = new JRadioButtonMenuItem( "No Taxonomy Extraction" ) );
         _options_jmenu
-        .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );
+                .add( _extract_taxonomy_pfam_strict_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style Node Names" ) );
         _options_jmenu
-        .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );
+                .add( _extract_taxonomy_pfam_relaxed_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids from Pfam-style like Node Names" ) );
         _options_jmenu
-        .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );
+                .add( _extract_taxonomy_agressive_rbmi = new JRadioButtonMenuItem( "Extract Taxonomy Codes/Ids/Scientific Names from Node Names" ) );
         _extract_taxonomy_pfam_strict_rbmi
-        .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );
+                .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"BCL2_MOUSE/123-304\" or \"BCL2_10090/123-304\"" );
         _extract_taxonomy_pfam_relaxed_rbmi
-        .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );
+                .setToolTipText( "To extract taxonomy codes/ids from node names in the form of e.g. \"bax_MOUSE\" or \"bax_10090\"" );
         _extract_taxonomy_agressive_rbmi
-        .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );
+                .setToolTipText( "To extract taxonomy codes/ids or scientific names from node names in the form of e.g. \"MOUSE\" or \"10090\" or \"xyz_Nematostella_vectensis\"" );
         _radio_group_2 = new ButtonGroup();
         _radio_group_2.add( _extract_taxonomy_no_rbmi );
         _radio_group_2.add( _extract_taxonomy_pfam_strict_rbmi );
@@ -1882,27 +1922,28 @@ public final class MainFrameApplication extends MainFrame {
         _radio_group_2.add( _extract_taxonomy_agressive_rbmi );
         _options_jmenu.add( customizeMenuItemAsLabel( new JMenuItem( "Newick/Nexus Save:" ), getConfiguration() ) );
         _options_jmenu
-        .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );
+                .add( _use_brackets_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_BRACKETS_FOR_CONF_IN_NH_LABEL ) );
         _use_brackets_for_conf_in_nh_export_cbmi
-        .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );
+                .setToolTipText( "e.g. \"0.1[90]\" for a branch with support 90 and a length of 0.1" );
         _options_jmenu
-        .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );
+                .add( _use_internal_names_for_conf_in_nh_export_cbmi = new JCheckBoxMenuItem( USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL ) );
         customizeJMenuItem( _choose_font_mi );
         customizeJMenuItem( _choose_minimal_confidence_mi );
         customizeJMenuItem( _switch_colors_mi );
         customizeJMenuItem( _choose_pdf_width_mi );
         customizeJMenuItem( _overview_placment_mi );
-        customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions()
-                                   .isShowDefaultNodeShapesExternal() );
-        customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions()
-                                   .isShowDefaultNodeShapesInternal() );
-        customizeCheckBoxMenuItem( _show_default_node_shapes_for_marked_cbmi, getOptions()
-                                   .isShowDefaultNodeShapesForMarkedNodes() );
+        customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi,
+                                   getOptions().isShowDefaultNodeShapesExternal() );
+        customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi,
+                                   getOptions().isShowDefaultNodeShapesInternal() );
+        customizeCheckBoxMenuItem( _show_default_node_shapes_for_marked_cbmi,
+                                   getOptions().isShowDefaultNodeShapesForMarkedNodes() );
         customizeJMenuItem( _cycle_node_shape_mi );
         customizeJMenuItem( _cycle_node_fill_mi );
         customizeJMenuItem( _choose_node_size_mi );
         customizeJMenuItem( _cycle_data_return );
-        customizeCheckBoxMenuItem( _color_labels_same_as_parent_branch, getOptions().isColorLabelsSameAsParentBranch() );
+        customizeCheckBoxMenuItem( _color_labels_same_as_parent_branch,
+                                   getOptions().isColorLabelsSameAsParentBranch() );
         customizeCheckBoxMenuItem( _color_by_taxonomic_group_cbmi, getOptions().isColorByTaxonomicGroup() );
         customizeCheckBoxMenuItem( _screen_antialias_cbmi, getOptions().isAntialiasScreen() );
         customizeCheckBoxMenuItem( _background_gradient_cbmi, getOptions().isBackgroundColorGradient() );
@@ -1911,19 +1952,20 @@ public final class MainFrameApplication extends MainFrame {
         customizeCheckBoxMenuItem( _abbreviate_scientific_names, getOptions().isAbbreviateScientificTaxonNames() );
         customizeCheckBoxMenuItem( _search_case_senstive_cbmi, getOptions().isSearchCaseSensitive() );
         customizeCheckBoxMenuItem( _show_scale_cbmi, getOptions().isShowScale() );
+        customizeCheckBoxMenuItem( _collapsed_with_average_height_cbmi, getOptions().isCollapsedWithAverageHeigh() );
+        customizeCheckBoxMenuItem( _show_abbreviated_labels_for_collapsed_nodes_cbmi, getOptions().isShowAbbreviatedLabelsForCollapsedNodes() );
+        
         customizeRadioButtonMenuItem( _non_lined_up_cladograms_rbmi,
                                       getOptions().getCladogramType() == CLADOGRAM_TYPE.NON_LINED_UP );
-        customizeRadioButtonMenuItem( _uniform_cladograms_rbmi,
-                                      getOptions().getCladogramType() == CLADOGRAM_TYPE.TOTAL_NODE_SUM_DEP );
         customizeRadioButtonMenuItem( _ext_node_dependent_cladogram_rbmi,
-                                      getOptions().getCladogramType() == CLADOGRAM_TYPE.EXT_NODE_SUM_DEP );
+                                      getOptions().getCladogramType() == CLADOGRAM_TYPE.LINED_UP );
         customizeCheckBoxMenuItem( _show_overview_cbmi, getOptions().isShowOverview() );
         customizeCheckBoxMenuItem( _label_direction_cbmi,
                                    getOptions().getNodeLabelDirection() == NODE_LABEL_DIRECTION.RADIAL );
         customizeCheckBoxMenuItem( _antialias_print_cbmi, getOptions().isAntialiasPrint() );
         customizeCheckBoxMenuItem( _print_black_and_white_cbmi, getOptions().isPrintBlackAndWhite() );
-        customizeCheckBoxMenuItem( _internal_number_are_confidence_for_nh_parsing_cbmi, getOptions()
-                                   .isInternalNumberAreConfidenceForNhParsing() );
+        customizeCheckBoxMenuItem( _internal_number_are_confidence_for_nh_parsing_cbmi,
+                                   getOptions().isInternalNumberAreConfidenceForNhParsing() );
         customizeRadioButtonMenuItem( _extract_taxonomy_no_rbmi,
                                       getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.NO );
         customizeRadioButtonMenuItem( _extract_taxonomy_pfam_strict_rbmi,
@@ -1933,20 +1975,23 @@ public final class MainFrameApplication extends MainFrame {
         customizeRadioButtonMenuItem( _extract_taxonomy_agressive_rbmi,
                                       getOptions().getTaxonomyExtraction() == TAXONOMY_EXTRACTION.AGGRESSIVE );
         customizeCheckBoxMenuItem( _replace_underscores_cbmi, getOptions().isReplaceUnderscoresInNhParsing() );
-        customizeCheckBoxMenuItem( _allow_errors_in_distance_to_parent_cbmi, getOptions()
-                                   .isReplaceUnderscoresInNhParsing() );
+        customizeCheckBoxMenuItem( _allow_errors_in_distance_to_parent_cbmi,
+                                   getOptions().isReplaceUnderscoresInNhParsing() );
         customizeCheckBoxMenuItem( _search_with_regex_cbmi, getOptions().isSearchWithRegex() );
         customizeCheckBoxMenuItem( _search_whole_words_only_cbmi, getOptions().isMatchWholeTermsOnly() );
         customizeCheckBoxMenuItem( _inverse_search_result_cbmi, getOptions().isInverseSearchResult() );
-        customizeCheckBoxMenuItem( _color_all_found_nodes_when_coloring_subtree_cbmi, getOptions().isColorAllFoundNodesWhenColoringSubtree() ); 
-        customizeCheckBoxMenuItem( _parse_beast_style_extended_nexus_tags_cbmi, getOptions().isParseBeastStyleExtendedNexusTags() ); 
-        
+        customizeCheckBoxMenuItem( _color_all_found_nodes_when_coloring_subtree_cbmi,
+                                   getOptions().isColorAllFoundNodesWhenColoringSubtree() );
+        customizeCheckBoxMenuItem( _parse_beast_style_extended_nexus_tags_cbmi,
+                                   getOptions().isParseBeastStyleExtendedNexusTags() );
         customizeCheckBoxMenuItem( _graphics_export_visible_only_cbmi, getOptions().isGraphicsExportVisibleOnly() );
         customizeCheckBoxMenuItem( _show_confidence_stddev_cbmi, getOptions().isShowConfidenceStddev() );
-        customizeCheckBoxMenuItem( _use_brackets_for_conf_in_nh_export_cbmi, getOptions()
-                                   .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );
-        customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi, getOptions()
-                                   .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );
+        customizeCheckBoxMenuItem( _use_brackets_for_conf_in_nh_export_cbmi,
+                                   getOptions()
+                                           .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );
+        customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi,
+                                   getOptions()
+                                           .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );
         customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData() );
         customizeCheckBoxMenuItem( _right_line_up_domains_cbmi, getOptions().isRightLineUpDomains() );
         _jmenubar.add( _options_jmenu );
@@ -1962,11 +2007,11 @@ public final class MainFrameApplication extends MainFrame {
             _inference_menu.add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences..." ) );
             customizeJMenuItem( _inference_from_seqs_item );
             _inference_from_seqs_item
-            .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );
+                    .setToolTipText( "Basic phylogenetic inference including multiple sequence alignment" );
         }
         else {
             _inference_menu
-            .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );
+                    .add( _inference_from_seqs_item = new JMenuItem( "From Unaligned Sequences (no program found)" ) );
             customizeJMenuItem( _inference_from_seqs_item );
             _inference_from_seqs_item.setEnabled( false );
         }
@@ -1985,7 +2030,7 @@ public final class MainFrameApplication extends MainFrame {
         _tools_menu.addSeparator();
         _tools_menu.add( _remove_visual_styles_item = new JMenuItem( "Delete All Visual Styles From Nodes" ) );
         _remove_visual_styles_item
-        .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny" );
+                .setToolTipText( "To remove all node visual styles (fonts, colors) from the current phylogeny" );
         customizeJMenuItem( _remove_visual_styles_item );
         _tools_menu.add( _remove_branch_color_item = new JMenuItem( "Delete All Colors From Branches" ) );
         _remove_branch_color_item.setToolTipText( "To remove all branch color values from the current phylogeny" );
@@ -2004,29 +2049,29 @@ public final class MainFrameApplication extends MainFrame {
         _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" ) );
+        _tools_menu.add( _collapse_species_specific_subtrees = new JMenuItem( "Collapse Single Taxonomy-Subtrees" ) );
         customizeJMenuItem( _collapse_species_specific_subtrees );
-        _collapse_species_specific_subtrees.setToolTipText( "To (reversibly) collapse species-specific subtrees" );
+        _collapse_species_specific_subtrees.setToolTipText( "To (reversibly) collapse subtrees associated with only one taxonomy (such as species specific subtrees)" );
         _tools_menu
-        .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );
+                .add( _collapse_below_threshold = new JMenuItem( "Collapse Branches with Confidence Below Threshold into Multifurcations" ) );
         customizeJMenuItem( _collapse_below_threshold );
         _collapse_below_threshold
-        .setToolTipText( "To (permanently) collapse branches with confidence values below a threshold into multifurcations (in the case of multiple confidences per branch: without at least one confidence value above a threshold)" );
+                .setToolTipText( "To (permanently) collapse branches with confidence values below a threshold into multifurcations (in the case of multiple confidences per branch: without at least one confidence value above a threshold)" );
         //
         _tools_menu
-        .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );
+                .add( _collapse_below_branch_length = new JMenuItem( "Collapse Branches with Branch Lengths Below Threshold into Multifurcations" ) );
         customizeJMenuItem( _collapse_below_branch_length );
         _collapse_below_branch_length
-        .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );
+                .setToolTipText( "To (permanently) collapse branches with branches with branch lengths below a threshold into multifurcations" );
         //
         _tools_menu.addSeparator();
         _tools_menu
-        .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );
+                .add( _extract_tax_code_from_node_names_jmi = new JMenuItem( "Extract Taxonomic Data from Node Names" ) );
         customizeJMenuItem( _extract_tax_code_from_node_names_jmi );
         _extract_tax_code_from_node_names_jmi
-        .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', Uniprot/NCBI identifiers form of 'xyz_6239', or scientific names form of 'xyz_Caenorhabditis_elegans'" );
+                .setToolTipText( "To extract SwissProt/Uniprot taxonomic codes (mnemonics) from nodes names in the form of 'xyz_CAEEL', Uniprot/NCBI identifiers form of 'xyz_6239', or scientific names form of 'xyz_Caenorhabditis_elegans'" );
         _tools_menu
-        .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );
+                .add( _move_node_names_to_tax_sn_jmi = new JMenuItem( "Transfer Node Names to Taxonomic Scientific Names" ) );
         customizeJMenuItem( _move_node_names_to_tax_sn_jmi );
         _move_node_names_to_tax_sn_jmi.setToolTipText( "To interpret node names as taxonomic scientific names" );
         _tools_menu.add( _move_node_names_to_seq_names_jmi = new JMenuItem( "Transfer Node Names to Sequence Names" ) );
@@ -2037,15 +2082,15 @@ public final class MainFrameApplication extends MainFrame {
         customizeJMenuItem( _obtain_seq_information_jmi );
         _obtain_seq_information_jmi.setToolTipText( "To add additional sequence information" );
         _tools_menu
-        .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );
+                .add( _obtain_detailed_taxonomic_information_jmi = new JMenuItem( OBTAIN_DETAILED_TAXONOMIC_INFORMATION ) );
         customizeJMenuItem( _obtain_detailed_taxonomic_information_jmi );
         _obtain_detailed_taxonomic_information_jmi
-        .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );
+                .setToolTipText( "To add additional taxonomic information (from UniProt Taxonomy)" );
         _tools_menu
-        .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );
+                .add( _obtain_detailed_taxonomic_information_deleting_jmi = new JMenuItem( "Obtain Detailed Taxonomic Information (deletes nodes!)" ) );
         customizeJMenuItem( _obtain_detailed_taxonomic_information_deleting_jmi );
         _obtain_detailed_taxonomic_information_deleting_jmi
-        .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );
+                .setToolTipText( "To add additional taxonomic information, deletes nodes for which taxonomy cannot found (from UniProt Taxonomy)" );
         _tools_menu.addSeparator();
         _tools_menu.add( _read_values_jmi = new JMenuItem( "Attach Vector/Expression Values" ) );
         customizeJMenuItem( _read_values_jmi );
@@ -2054,14 +2099,14 @@ public final class MainFrameApplication extends MainFrame {
         _tools_menu.add( _read_seqs_jmi = new JMenuItem( "Attach Molecular Sequences" ) );
         customizeJMenuItem( _read_seqs_jmi );
         _read_seqs_jmi
-        .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );
+                .setToolTipText( "To attach molecular sequences to tree nodes (from Fasta-formatted file) (beta)" );
         _jmenubar.add( _tools_menu );
     }
 
     @Override
     void close() {
         if ( isUnsavedDataPresent() ) {
-            final int r = JOptionPane.showConfirmDialog( this,
+            final int r = JOptionPane.showConfirmDialog( getThisFrame(),
                                                          "Exit despite potentially unsaved changes?",
                                                          "Exit?",
                                                          JOptionPane.YES_NO_OPTION );
@@ -2085,10 +2130,11 @@ public final class MainFrameApplication extends MainFrame {
         URL url = null;
         Phylogeny[] phys = null;
         final String message = "Please enter a complete URL, for example \"http://purl.org/phylo/treebase/phylows/study/TB2:S15480?format=nexus\"";
-        final String url_string = JOptionPane.showInputDialog( this,
-                                                               message,
-                                                               "Use URL/webservice to obtain a phylogeny",
-                                                               JOptionPane.QUESTION_MESSAGE );
+        final String url_string = JOptionPane
+                .showInputDialog( getThisFrame(),
+                                  message,
+                                  "Use URL/webservice to obtain a phylogeny",
+                                  JOptionPane.QUESTION_MESSAGE );
         boolean nhx_or_nexus = false;
         if ( ( url_string != null ) && ( url_string.length() > 0 ) ) {
             try {
@@ -2098,8 +2144,9 @@ public final class MainFrameApplication extends MainFrame {
                     parser = new TolParser();
                 }
                 else {
-                    parser = ParserUtils.createParserDependingOnUrlContents( url, getConfiguration()
-                                                                             .isValidatePhyloXmlAgainstSchema() );
+                    parser = ParserUtils
+                            .createParserDependingOnUrlContents( url,
+                                                                 getConfiguration().isValidatePhyloXmlAgainstSchema() );
                 }
                 if ( parser instanceof NexusPhylogeniesParser ) {
                     nhx_or_nexus = true;
@@ -2117,20 +2164,20 @@ public final class MainFrameApplication extends MainFrame {
                 phys = factory.create( url.openStream(), parser );
             }
             catch ( final MalformedURLException e ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Malformed URL: " + url + "\n" + e.getLocalizedMessage(),
                                                "Malformed URL",
                                                JOptionPane.ERROR_MESSAGE );
             }
             catch ( final IOException e ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                "Could not read from " + url + "\n"
                                                        + ForesterUtil.wordWrap( e.getLocalizedMessage(), 80 ),
-                                                       "Failed to read URL",
-                                                       JOptionPane.ERROR_MESSAGE );
+                                               "Failed to read URL",
+                                               JOptionPane.ERROR_MESSAGE );
             }
             catch ( final Exception e ) {
-                JOptionPane.showMessageDialog( this,
+                JOptionPane.showMessageDialog( getThisFrame(),
                                                ForesterUtil.wordWrap( e.getLocalizedMessage(), 80 ),
                                                "Unexpected Exception",
                                                JOptionPane.ERROR_MESSAGE );
@@ -2198,11 +2245,10 @@ public final class MainFrameApplication extends MainFrame {
 
     static void warnIfNotPhyloXmlValidation( final Configuration c ) {
         if ( !c.isValidatePhyloXmlAgainstSchema() ) {
-            JOptionPane
-            .showMessageDialog( null,
-                                ForesterUtil
-                                .wordWrap( "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]",
-                                           80 ),
+            JOptionPane.showMessageDialog( null,
+                                           ForesterUtil.wordWrap(
+                                                                  "phyloXML XSD-based validation is turned off [enable with line 'validate_against_phyloxml_xsd_schem: true' in configuration file]",
+                                                                  80 ),
                                            "Warning",
                                            JOptionPane.WARNING_MESSAGE );
         }