inprogress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / ArchaeopteryxE.java
index 9146fe8..89e043f 100644 (file)
@@ -13,7 +13,6 @@ import java.io.IOException;
 import java.net.URL;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 import java.util.NoSuchElementException;
 
 import javax.swing.ButtonGroup;
@@ -280,7 +279,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
             MainFrame.about();
         }
         else if ( o == _help_item ) {
-            help( getConfiguration().getWebLinks() );
+            help();
         }
         else if ( o == _website_item ) {
             try {
@@ -422,17 +421,17 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         setupUI();
         URL phys_url = null;
         Phylogeny[] phys = null;
-        final String phys_url_string = getParameter( Constants.APPLET_PARAM_NAME_FOR_URL_OF_TREE_TO_LOAD );
-        AptxUtil.printAppletMessage( NAME, "URL for phylogenies is " + phys_url_string );
+        final String tree_url_str = getParameter( Constants.APPLET_PARAM_NAME_FOR_URL_OF_TREE_TO_LOAD );
+        AptxUtil.printAppletMessage( NAME, "URL for phylogenies is " + tree_url_str );
         // Get URL to tree file
-        if ( phys_url_string != null ) {
+        if ( tree_url_str != null ) {
             try {
-                phys_url = new URL( phys_url_string );
+                phys_url = new URL( tree_url_str );
             }
             catch ( final Exception e ) {
                 ForesterUtil.printErrorMessage( NAME, "error: " + e );
                 e.printStackTrace();
-                JOptionPane.showMessageDialog( this, NAME + ": Could not create URL from: \"" + phys_url_string
+                JOptionPane.showMessageDialog( this, NAME + ": Could not create URL from: \"" + tree_url_str
                         + "\"\nException: " + e, "Failed to create URL", JOptionPane.ERROR_MESSAGE );
             }
         }
@@ -488,11 +487,14 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
             @Override
             public void componentResized( final ComponentEvent e ) {
                 if ( getMainPanel().getCurrentTreePanel() != null ) {
-                    getMainPanel().getCurrentTreePanel().setParametersForPainting( getMainPanel().getCurrentTreePanel()
-                                                                                           .getWidth(),
-                                                                                   getMainPanel().getCurrentTreePanel()
-                                                                                           .getHeight(),
-                                                                                   false );
+                    getMainPanel().getCurrentTreePanel().calcParametersForPainting( getMainPanel()
+                                                                                            .getCurrentTreePanel()
+                                                                                            .getWidth(),
+                                                                                    getMainPanel()
+                                                                                            .getCurrentTreePanel()
+                                                                                            .getHeight(),
+                                                                                    getOptions()
+                                                                                            .isAllowFontSizeChange() );
                 }
             }
         } );
@@ -813,7 +815,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         return _options;
     }
 
-    void help( final Map<String, WebLink> weblinks ) {
+    void help() {
         final StringBuilder sb = new StringBuilder();
         sb.append( "Display options\n" );
         sb.append( "-------------------\n" );
@@ -851,15 +853,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         sb.append( "Since the Java default memory allocation is quite small, it might by necessary (for trees\n" );
         sb.append( "with more than approximately 5000 external nodes) to increase the memory which Java can use, with\n" );
         sb.append( "the '-Xmx' Java command line option. For example:\n" );
-        sb.append( "java -Xms32m -Xmx256m -cp path\\to\\forester.jar org.forester.archaeopteryx.Archaeopteryx\n\n" );
-        if ( ( weblinks != null ) && ( weblinks.size() > 0 ) ) {
-            sb.append( "Active web links\n" );
-            sb.append( "--------------------\n" );
-            for( final String key : weblinks.keySet() ) {
-                sb.append( " " + weblinks.get( key ).toString() + "\n" );
-            }
-        }
-        sb.append( "\n" );
+        sb.append( "java -Xmx1024m -cp path\\to\\forester.jar org.forester.archaeopteryx.Archaeopteryx\n\n" );
         sb.append( "phyloXML\n" );
         sb.append( "-------------------\n" );
         sb.append( "Reference: " + Constants.PHYLOXML_REFERENCE + "\n" );