cleanup
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 9 Dec 2011 02:15:00 +0000 (02:15 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 9 Dec 2011 02:15:00 +0000 (02:15 +0000)
forester/java/src/org/forester/application/surfacing.java
forester/java/src/org/forester/application/surfacing_hmmpfam.java
forester/java/src/org/forester/archaeopteryx/NodePanel.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/surfacing/SurfacingUtil.java

index aafd989..f878fa6 100644 (file)
@@ -2373,8 +2373,9 @@ public class surfacing {
         System.out.println();
     }
 
-    private static void createSplitWriters( File out_dir, String my_outfile, Map<Character, Writer> split_writers )
-            throws IOException {
+    private static void createSplitWriters( final File out_dir,
+                                            final String my_outfile,
+                                            final Map<Character, Writer> split_writers ) throws IOException {
         split_writers.put( 'a', new BufferedWriter( new FileWriter( out_dir + ForesterUtil.FILE_SEPARATOR + my_outfile
                 + "_domains_A.html" ) ) );
         split_writers.put( 'b', new BufferedWriter( new FileWriter( out_dir + ForesterUtil.FILE_SEPARATOR + my_outfile
index bd97c50..476640b 100644 (file)
@@ -1973,7 +1973,6 @@ public class surfacing_hmmpfam {
             pw_stats = SurfacingUtil
                     .writeDomainSimilaritiesToFile( html_desc,
                                                     new StringBuilder( number_of_genomes + " genomes" ),
-                                                    
                                                     writer,
                                                     null,
                                                     similarities,
index 768a397..37810c6 100644 (file)
@@ -231,9 +231,6 @@ class NodePanel extends JPanel implements TreeSelectionListener {
         }
     }
 
-   
-    
-    
     private static void addBasics( final DefaultMutableTreeNode top,
                                    final PhylogenyNode phylogeny_node,
                                    final String name ) {
@@ -264,7 +261,6 @@ class NodePanel extends JPanel implements TreeSelectionListener {
                 if ( no_tax > 0 ) {
                     addSubelement( category, "External nodes without taxonomy", String.valueOf( no_tax ) );
                 }
-              
             }
         }
         if ( !phylogeny_node.isRoot() ) {
index f33c31d..6afa7a7 100644 (file)
@@ -216,7 +216,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
     private double                          _max_distance_to_root             = -1;
     private int                             _dynamic_hiding_factor            = 0;
     private boolean                         _edited                           = false;
-   private Popup                           _node_desc_popup;
+    private Popup                           _node_desc_popup;
     private JTextArea                       _rollover_popup;
     // private final int                       _box_size;
     // private final int                       _half_box_size;
@@ -3168,10 +3168,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             else {
                 sb.append( " " );
             }
-           
-            
             final Property p = properties.getProperty( ref );
-            
             sb.append( getPartAfterColon( p.getRef() ) );
             sb.append( "=" );
             sb.append( p.getValue() );
@@ -3181,10 +3178,10 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         }
         return sb;
     }
-    
+
     final private static String getPartAfterColon( final String s ) {
         final int i = s.indexOf( ':' );
-        if ( (i < 1) ||( i == ( s.length()-1)) ) {
+        if ( ( i < 1 ) || ( i == ( s.length() - 1 ) ) ) {
             return s;
         }
         return s.substring( i + 1, s.length() );
@@ -4755,7 +4752,6 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         }
                     }
                 }
-                
                 if ( _popup_buffer.length() > 0 ) {
                     if ( !getConfiguration().isUseNativeUI() ) {
                         _rollover_popup
index e6e8736..ddc6602 100644 (file)
@@ -2139,18 +2139,15 @@ public final class SurfacingUtil {
                 System.out.println( "Pearsonian skewness : n/a" );
             }
         }
-
-        if ( single_writer != null && ( split_writers == null || split_writers.isEmpty() ) ) {
+        if ( ( single_writer != null ) && ( ( split_writers == null ) || split_writers.isEmpty() ) ) {
             split_writers = new HashMap<Character, Writer>();
             split_writers.put( '_', single_writer );
-        
         }
-
         switch ( print_option ) {
             case SIMPLE_TAB_DELIMITED:
                 break;
             case HTML:
-                for (Writer w : split_writers.values()) {
+                for( final Writer w : split_writers.values() ) {
                     w.write( "<html>" );
                     w.write( SurfacingConstants.NL );
                     addHtmlHead( w, "SURFACING :: " + html_title );
@@ -2209,7 +2206,7 @@ public final class SurfacingUtil {
                 }
                 break;
         }
-        for (Writer w : split_writers.values()) {
+        for( final Writer w : split_writers.values() ) {
             w.write( SurfacingConstants.NL );
         }
         for( final DomainSimilarity similarity : similarities ) {
@@ -2220,33 +2217,34 @@ public final class SurfacingUtil {
                 single_writer.write( similarity.toStringBuffer( print_option ).toString() );
             }
             else {
-                Writer local_writer = split_writers.get( ( similarity.getDomainId().getId().charAt( 0 ) + "" ).toLowerCase().charAt( 0 ) );
+                Writer local_writer = split_writers.get( ( similarity.getDomainId().getId().charAt( 0 ) + "" )
+                        .toLowerCase().charAt( 0 ) );
                 if ( local_writer == null ) {
                     local_writer = split_writers.get( '0' );
-                }    
+                }
                 local_writer.write( similarity.toStringBuffer( print_option ).toString() );
             }
-            for (Writer w : split_writers.values()) {
+            for( final Writer w : split_writers.values() ) {
                 w.write( SurfacingConstants.NL );
             }
         }
         switch ( print_option ) {
             case HTML:
-                for (Writer w : split_writers.values()) {
-                w.write( SurfacingConstants.NL );
-                w.write( "</table>" );
-                w.write( SurfacingConstants.NL );
-                w.write( "</font>" );
-                w.write( SurfacingConstants.NL );
-                w.write( "</body>" );
-                w.write( SurfacingConstants.NL );
-                w.write( "</html>" );
-                w.write( SurfacingConstants.NL );
+                for( final Writer w : split_writers.values() ) {
+                    w.write( SurfacingConstants.NL );
+                    w.write( "</table>" );
+                    w.write( SurfacingConstants.NL );
+                    w.write( "</font>" );
+                    w.write( SurfacingConstants.NL );
+                    w.write( "</body>" );
+                    w.write( SurfacingConstants.NL );
+                    w.write( "</html>" );
+                    w.write( SurfacingConstants.NL );
                 }
                 break;
         }
-        for (Writer w : split_writers.values()) {
-        w.close();
+        for( final Writer w : split_writers.values() ) {
+            w.close();
         }
         return stats;
     }