clean up
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 20 Aug 2014 01:07:03 +0000 (01:07 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 20 Aug 2014 01:07:03 +0000 (01:07 +0000)
34 files changed:
forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java
forester/java/src/org/forester/analysis/TaxonomyDataManager.java
forester/java/src/org/forester/application/msa_compactor.java
forester/java/src/org/forester/application/rio.java
forester/java/src/org/forester/application/surfacing.java
forester/java/src/org/forester/archaeopteryx/AptxUtil.java
forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/archaeopteryx/ControlPanel.java
forester/java/src/org/forester/archaeopteryx/MainFrame.java
forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java
forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java
forester/java/src/org/forester/archaeopteryx/Options.java
forester/java/src/org/forester/archaeopteryx/TreeColorSet.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/archaeopteryx/TreePanelUtil.java
forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderablePhylogenyData.java
forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableVector.java
forester/java/src/org/forester/evoinference/distance/NeighborJoining.java
forester/java/src/org/forester/evoinference/distance/NeighborJoiningF.java
forester/java/src/org/forester/evoinference/distance/NeighborJoiningR.java
forester/java/src/org/forester/evoinference/distance/Sarray.java
forester/java/src/org/forester/go/BasicGoRelationship.java
forester/java/src/org/forester/go/GoRelationship.java
forester/java/src/org/forester/msa/DeleteableMsa.java
forester/java/src/org/forester/phylogeny/PhylogenyMethods.java
forester/java/src/org/forester/phylogeny/data/NodeData.java
forester/java/src/org/forester/phylogeny/data/Taxonomy.java
forester/java/src/org/forester/rio/RIO.java
forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java
forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java
forester/java/src/org/forester/surfacing/DirectedBinaryDomainCombination.java
forester/java/src/org/forester/surfacing/DomainSimilarity.java

index 11d678d..25021bc 100644 (file)
@@ -65,7 +65,7 @@ public final class AncestralTaxonomyInference {
                             || !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getScientificName() )
                             || !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getLineage() )
                             || !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getTaxonomyCode() ) || !ForesterUtil
-                            .isEmpty( desc.getNodeData().getTaxonomy().getCommonName() ) ) ) {
+                                .isEmpty( desc.getNodeData().getTaxonomy().getCommonName() ) ) ) {
                 final UniProtTaxonomy up_tax = TaxonomyDataManager.obtainUniProtTaxonomy( desc.getNodeData()
                         .getTaxonomy(), null, null );
                 if ( ( up_tax == null ) && ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getLineage() ) ) {
index 6301504..fbc8d0c 100644 (file)
@@ -251,7 +251,7 @@ public final class TaxonomyDataManager extends RunnableProcess {
                 if ( ( ( tax != null ) && ( isHasAppropriateId( tax )
                         || !ForesterUtil.isEmpty( tax.getScientificName() )
                         || !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) || !ForesterUtil
-                        .isEmpty( tax.getCommonName() ) ) ) ) {
+                            .isEmpty( tax.getCommonName() ) ) ) ) {
                     uniprot_tax = obtainUniProtTaxonomy( tax, null, qt );
                 }
                 else {
index 4e51675..329af42 100644 (file)
@@ -145,7 +145,7 @@ public class msa_compactor {
             }
             if ( cla.isOptionSet( REMOVE_WORST_OFFENDERS_OPTION ) ) {
                 worst_remove = cla.getOptionValueAsInt( REMOVE_WORST_OFFENDERS_OPTION );
-                if ( ( worst_remove < 1 ) || ( worst_remove >= msa.getNumberOfSequences() - 1 ) ) {
+                if ( ( worst_remove < 1 ) || ( worst_remove >= ( msa.getNumberOfSequences() - 1 ) ) ) {
                     ForesterUtil.fatalError( PRG_NAME, "number of worst offender sequences to remove is out of range: "
                             + worst_remove );
                 }
index 51a36bf..27c4ee0 100644 (file)
@@ -382,15 +382,15 @@ public class rio {
             final java.text.DecimalFormat df = new java.text.DecimalFormat( "0.#" );
             System.out.println( "Mean number of duplications  : " + df.format( stats.arithmeticMean() ) + " (sd: "
                     + df.format( stats.sampleStandardDeviation() ) + ") ("
-                    + df.format( 100.0 * stats.arithmeticMean() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+                    + df.format( ( 100.0 * stats.arithmeticMean() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
             if ( stats.getN() > 3 ) {
                 System.out.println( "Median number of duplications: " + df.format( stats.median() ) + " ("
-                        + df.format( 100.0 * stats.median() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+                        + df.format( ( 100.0 * stats.median() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
             }
             System.out.println( "Minimum duplications         : " + ( int ) stats.getMin() + " ("
-                    + df.format( 100.0 * stats.getMin() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+                    + df.format( ( 100.0 * stats.getMin() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
             System.out.println( "Maximum duplications         : " + ( int ) stats.getMax() + " ("
-                    + df.format( 100.0 * stats.getMax() / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
+                    + df.format( ( 100.0 * stats.getMax() ) / rio.getIntNodesOfAnalyzedGeneTrees() ) + "%)" );
             System.out.println( "Gene tree internal nodes     : " + rio.getIntNodesOfAnalyzedGeneTrees() );
             System.out.println( "Gene tree external nodes     : " + rio.getExtNodesOfAnalyzedGeneTrees() );
         }
index a05cac3..141db17 100644 (file)
@@ -2193,7 +2193,7 @@ public class surfacing {
         System.out.println();
         System.out
                 .println( "Example 1: surfacing -p2g=pfam2go.txt -obo=go.obo -species_tree=tol_156.xml -no_eo -ie=0.01 -dufs -genomes=genomes_all.txt -pos_filter=tf_1.txt -out_dir=_tf1 -o=tf1" );
-System.out.println();
+        System.out.println();
         System.out
                 .println( "Example 2: surfacing -p2g=pfam2go.txt -obo=go.obo -species_tree=tol_156.xml -last -ignore_viral_ids -no_eo -ie=0.1 -dufs -genomes=genomes_all.txt -pos_filter=tf_1.txt -all_prot -all_prot_e=0.1 -out_dir=_tf1_e01_ape01 -o=tf1_e01_ape01" );
         System.out.println();
index 38ac2b1..e95283d 100644 (file)
@@ -947,7 +947,6 @@ public final class AptxUtil {
         }
     }
 
-   
     public static enum GraphicsExportType {
         BMP( "bmp" ), GIF( "gif" ), JPG( "jpg" ), PDF( "pdf" ), PNG( "png" ), TIFF( "tif" );
 
index 95f546c..ece59e5 100644 (file)
@@ -132,10 +132,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
     private JMenuItem                   _gsdi_item;
     private JMenuItem                   _gsdir_item;
     private Phylogeny                   _species_tree;
-    
-    private JCheckBoxMenuItem _right_line_up_domains_cbmi;
-    private JCheckBoxMenuItem _line_up_renderable_data_cbmi;
-    
+    private JCheckBoxMenuItem           _right_line_up_domains_cbmi;
+    private JCheckBoxMenuItem           _line_up_renderable_data_cbmi;
 
     @Override
     public void actionPerformed( final ActionEvent e ) {
@@ -353,9 +351,6 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         else if ( o == _color_by_taxonomic_group_cbmi ) {
             updateOptions( getOptions() );
         }
-       
-        
-        
         else if ( o == _line_up_renderable_data_cbmi ) {
             if ( !_line_up_renderable_data_cbmi.isSelected() ) {
                 _right_line_up_domains_cbmi.setSelected( false );
@@ -368,7 +363,6 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
             }
             updateOptions( getOptions() );
         }
-        
         repaint();
     }
 
@@ -1102,8 +1096,6 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         return _options;
     }
 
-   
-
     void initializeTypeMenu( final Options options ) {
         setTypeMenuToAllUnselected();
         try {
@@ -1372,17 +1364,12 @@ public class ArchaeopteryxE extends JApplet implements ActionListener {
         if ( ( _color_by_taxonomic_group_cbmi != null ) && _color_by_taxonomic_group_cbmi.isEnabled() ) {
             options.setColorByTaxonomicGroup( _color_by_taxonomic_group_cbmi.isSelected() );
         }
-        
-       
         if ( ( _right_line_up_domains_cbmi != null ) && _right_line_up_domains_cbmi.isEnabled() ) {
             options.setRightLineUpDomains( _right_line_up_domains_cbmi.isSelected() );
         }
-        
-        
         if ( ( _line_up_renderable_data_cbmi != null ) && _line_up_renderable_data_cbmi.isEnabled() ) {
             options.setLineUpRendarableNodeData( _line_up_renderable_data_cbmi.isSelected() );
         }
-        
     }
 
     void updateTypeCheckboxes( final Options options, final Object o ) {
index c1a1096..5debb52 100644 (file)
@@ -220,9 +220,8 @@ public final class Configuration {
     private Color                           _vector_data_mean_color                                = Color.WHITE;
     private double                          _vector_data_height                                    = 12;
     private int                             _vector_data_width                                     = 120;
-    private boolean _line_up_renderable_node_data;
-    private boolean _right_align_domains;
-    
+    private boolean                         _line_up_renderable_node_data;
+    private boolean                         _right_align_domains;
     static {
         for( final String font_name : Constants.DEFAULT_FONT_CHOICES ) {
             if ( Arrays.binarySearch( AptxUtil.getAvailableFontFamiliesSorted(), font_name ) >= 0 ) {
@@ -1378,7 +1377,6 @@ public final class Configuration {
         else if ( key.equals( "gui_button_border_color" ) ) {
             _gui_button_border_color = Color.decode( ( String ) st.nextElement() );
         }
-      
         else if ( key.equals( "show_default_node_shapes" ) ) {
             ForesterUtil
                     .printWarningMessage( Constants.PRG_NAME,
@@ -1495,7 +1493,6 @@ public final class Configuration {
                         + "] for [ext_descendents_data_to_return_on]" );
             }
         }
-       
         else if ( key.equals( "vector_data_min_color" ) ) {
             _vector_data_min_color = Color.decode( ( String ) st.nextElement() );
         }
@@ -1505,7 +1502,6 @@ public final class Configuration {
         else if ( key.equals( "vector_data_mean_color" ) ) {
             _vector_data_mean_color = Color.decode( ( String ) st.nextElement() );
         }
-      
         else if ( key.equals( "vector_data_width" ) ) {
             _vector_data_width = parseShort( ( String ) st.nextElement() );
             if ( _vector_data_width < 1 ) {
@@ -1518,16 +1514,12 @@ public final class Configuration {
                 _vector_data_height = 12;
             }
         }
-       
         else if ( key.equals( "line_up_renderable_data" ) ) {
             setLineUpRendarableNodeData( parseBoolean( ( String ) st.nextElement() ) );
         }
-        
         else if ( key.equals( "right_align_domain_architectures" ) ) {
             setRightLineUpDomains( parseBoolean( ( String ) st.nextElement() ) );
         }
-        
-        
         else if ( st.countTokens() >= 2 ) { // counts the tokens that are not
             // yet retrieved!
             int key_index = -1;
@@ -1759,26 +1751,20 @@ public final class Configuration {
     public int getVectorDataWidth() {
         return _vector_data_width;
     }
-    
+
     final public boolean isLineUpRendarableNodeData() {
-        
         return _line_up_renderable_node_data;
     }
-    
+
     final public boolean isRightLineUpDomains() {
-        
         return _right_align_domains;
     }
-    
-    final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data) {
-        
-         _line_up_renderable_node_data = line_up_renderable_node_data;
+
+    final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data ) {
+        _line_up_renderable_node_data = line_up_renderable_node_data;
     }
-    
+
     final public void setRightLineUpDomains( final boolean right_align_domains ) {
-        
         _right_align_domains = right_align_domains;
     }
-    
-    
 }
index a048c12..4ecd283 100644 (file)
@@ -37,9 +37,9 @@ import org.forester.util.ForesterConstants;
 public final class Constants {
 
     final static boolean        __ALLOW_PHYLOGENETIC_INFERENCE                                = true;
-    public final static boolean __RELEASE                                                     = false;                                                               // TODO remove me
-    public final static boolean __SNAPSHOT_RELEASE                                            = false;                                                               // TODO remove me
-    public final static boolean __SYNTH_LF                                                    = false;                                                               // TODO remove me
+    public final static boolean __RELEASE                                                     = false;                                                                             // TODO remove me
+    public final static boolean __SNAPSHOT_RELEASE                                            = false;                                                                             // TODO remove me
+    public final static boolean __SYNTH_LF                                                    = false;                                                                             // TODO remove me
     public final static boolean ALLOW_DDBJ_BLAST                                              = false;
     public final static String  PRG_NAME                                                      = "Archaeopteryx";
     final static String         VERSION                                                       = "0.9894 beta";
@@ -59,7 +59,7 @@ public final class Constants {
     final static float          WHEEL_ZOOM_OUT_FACTOR                                         = 1 / Constants.WHEEL_ZOOM_IN_FACTOR;
     final static float          WHEEL_ZOOM_IN_X_CORRECTION_FACTOR                             = 1.085f;
     final static float          WHEEL_ZOOM_OUT_X_CORRECTION_FACTOR                            = 1 / Constants.WHEEL_ZOOM_IN_X_CORRECTION_FACTOR;
-    static final boolean        SPECIAL_CUSTOM                                                = false;                                                               //TODO remove me
+    static final boolean        SPECIAL_CUSTOM                                                = false;                                                                             //TODO remove me
     static final double         EXT_NODE_INFO_LENGTH_MAX_RATIO                                = 0.95;
     static final Dimension      NODE_PANEL_SPLIT_MINIMUM_SIZE                                 = new Dimension( 100, 50 );
     static final Dimension      NODE_PANEL_SIZE                                               = new Dimension( 500, 600 );
@@ -77,11 +77,10 @@ public final class Constants {
     final static float          PDF_LINE_WIDTH_DEFAULT                                        = 0.5f;
     final static String         APTX_WEB_SITE                                                 = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx";
     final static String         APTX_DOC_SITE                                                 = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx/documentation";
-    
     final static String         PHYLOXML_WEB_SITE                                             = ForesterConstants.PHYLO_XML_LOCATION;
     final static String         PHYLOXML_REFERENCE_URL                                        = "http://www.biomedcentral.com/1471-2105/10/356/";
     final static String         APTX_REFERENCE_URL                                            = "http://www.biomedcentral.com/bmcbioinformatics/";
-    final static String         APTX_REFERENCE                                                = "Zmasek...";                                                         //TODO
+    final static String         APTX_REFERENCE                                                = "Zmasek...";                                                                       //TODO
     final static String         PHYLOXML_REFERENCE                                            = ForesterConstants.PHYLO_XML_REFERENCE;
     final static String         PHYLOXML_REFERENCE_SHORT                                      = "Han MV and Zmasek CM (2009), BMC Bioinformatics, 10:356";
     final static short          NUMBER_OF_DIGITS_AFTER_COMMA_FOR_BRANCH_LENGTH_VALUES_DEFAULT = 3;
index 2fe6429..225a591 100644 (file)
@@ -71,107 +71,107 @@ import org.forester.util.ForesterUtil;
 
 final class ControlPanel extends JPanel implements ActionListener {
 
-    final static Font            jcb_bold_font             = new Font( Configuration.getDefaultFontFamilyName(),
-                                                                       Font.BOLD,
-                                                                       9 );
-    final static Font            jcb_font                  = new Font( Configuration.getDefaultFontFamilyName(),
-                                                                       Font.PLAIN,
-                                                                       9 );
-    final static Font            js_font                   = new Font( Configuration.getDefaultFontFamilyName(),
-                                                                       Font.PLAIN,
-                                                                       9 );
-    private static final String  RETURN_TO_SUPER_TREE_TEXT = "Back to Super Tree";
-    private static final long    serialVersionUID          = -8463483932821545633L;
-    private NodeClickAction      _action_when_node_clicked;
-    private int                  _add_new_node_item;
-    private Map<Integer, String> _all_click_to_names;
-    private Map<String, Color>   _annotation_colors;
-    private int                  _blast_item;
-    private JComboBox<String>            _click_to_combobox;
-    private JLabel               _click_to_label;
-    private List<String>         _click_to_names;
-    private int                  _collapse_cb_item;
-    private JCheckBox            _color_acc_species;
-    private JCheckBox            _color_acc_sequence;
-    private JCheckBox            _color_according_to_annotation;
-    private boolean              _color_branches;
-    private JCheckBox            _use_visual_styles_cb;
-    private int                  _color_subtree_cb_item;
-    private int                  _change_node_font_item;
+    final static Font                         jcb_bold_font             = new Font( Configuration.getDefaultFontFamilyName(),
+                                                                                    Font.BOLD,
+                                                                                    9 );
+    final static Font                         jcb_font                  = new Font( Configuration.getDefaultFontFamilyName(),
+                                                                                    Font.PLAIN,
+                                                                                    9 );
+    final static Font                         js_font                   = new Font( Configuration.getDefaultFontFamilyName(),
+                                                                                    Font.PLAIN,
+                                                                                    9 );
+    private static final String               RETURN_TO_SUPER_TREE_TEXT = "Back to Super Tree";
+    private static final long                 serialVersionUID          = -8463483932821545633L;
+    private NodeClickAction                   _action_when_node_clicked;
+    private int                               _add_new_node_item;
+    private Map<Integer, String>              _all_click_to_names;
+    private Map<String, Color>                _annotation_colors;
+    private int                               _blast_item;
+    private JComboBox<String>                 _click_to_combobox;
+    private JLabel                            _click_to_label;
+    private List<String>                      _click_to_names;
+    private int                               _collapse_cb_item;
+    private JCheckBox                         _color_acc_species;
+    private JCheckBox                         _color_acc_sequence;
+    private JCheckBox                         _color_according_to_annotation;
+    private boolean                           _color_branches;
+    private JCheckBox                         _use_visual_styles_cb;
+    private int                               _color_subtree_cb_item;
+    private int                               _change_node_font_item;
     // The settings from the conf file
-    private final Configuration  _configuration;
-    private int                  _copy_subtree_item;
-    private int                  _cut_subtree_item;
-    private JButton              _decr_domain_structure_evalue_thr;
-    private int                  _delete_node_or_subtree_item;
-    private JCheckBox            _display_as_phylogram_cb;
+    private final Configuration               _configuration;
+    private int                               _copy_subtree_item;
+    private int                               _cut_subtree_item;
+    private JButton                           _decr_domain_structure_evalue_thr;
+    private int                               _delete_node_or_subtree_item;
+    private JCheckBox                         _display_as_phylogram_cb;
     // Tree checkboxes
-    private JCheckBox            _display_internal_data;
-    private JLabel               _domain_display_label;
-    private JTextField           _domain_structure_evalue_thr_tf;
-    private List<Boolean>        _draw_phylogram;
-    private JCheckBox            _dynamically_hide_data;
-    private int                  _edit_node_data_item;
-    private int                  _get_ext_desc_data;
-    private JButton              _incr_domain_structure_evalue_thr;
-    private final MainPanel      _mainpanel;
-    private JCheckBox            _node_desc_popup_cb;
-    private int                  _open_pdb_item;
-    private int                  _open_seq_web_item;
-    private int                  _open_tax_web_item;
-    private int                  _color_node_font_item;
-    private JButton              _order;
-    private boolean              _order_of_appearance;
-    private int                  _paste_subtree_item;
-    private int                  _reroot_cb_item;
-    private JButton              _return_to_super_tree;
+    private JCheckBox                         _display_internal_data;
+    private JLabel                            _domain_display_label;
+    private JTextField                        _domain_structure_evalue_thr_tf;
+    private List<Boolean>                     _draw_phylogram;
+    private JCheckBox                         _dynamically_hide_data;
+    private int                               _edit_node_data_item;
+    private int                               _get_ext_desc_data;
+    private JButton                           _incr_domain_structure_evalue_thr;
+    private final MainPanel                   _mainpanel;
+    private JCheckBox                         _node_desc_popup_cb;
+    private int                               _open_pdb_item;
+    private int                               _open_seq_web_item;
+    private int                               _open_tax_web_item;
+    private int                               _color_node_font_item;
+    private JButton                           _order;
+    private boolean                           _order_of_appearance;
+    private int                               _paste_subtree_item;
+    private int                               _reroot_cb_item;
+    private JButton                           _return_to_super_tree;
     // Search 
-    private JLabel               _search_found_label_0;
-    private JLabel               _search_found_label_1;
-    private JButton              _search_reset_button_0;
-    private JButton              _search_reset_button_1;
-    private JTextField           _search_tf_0;
-    private JTextField           _search_tf_1;
-    private int                  _select_nodes_item;
-    private Sequence             _selected_query_seq;
-    private JCheckBox            _seq_relation_confidence_switch;
-    private JComboBox<SEQUENCE_RELATION_TYPE>            _sequence_relation_type_box;
-    private JCheckBox            _show_annotation;
-    private JCheckBox            _show_binary_character_counts;
-    private JCheckBox            _show_binary_characters;
+    private JLabel                            _search_found_label_0;
+    private JLabel                            _search_found_label_1;
+    private JButton                           _search_reset_button_0;
+    private JButton                           _search_reset_button_1;
+    private JTextField                        _search_tf_0;
+    private JTextField                        _search_tf_1;
+    private int                               _select_nodes_item;
+    private Sequence                          _selected_query_seq;
+    private JCheckBox                         _seq_relation_confidence_switch;
+    private JComboBox<SEQUENCE_RELATION_TYPE> _sequence_relation_type_box;
+    private JCheckBox                         _show_annotation;
+    private JCheckBox                         _show_binary_character_counts;
+    private JCheckBox                         _show_binary_characters;
     // Indices for the click-to options in the combo box
-    private int                  _show_data_item;
-    private JCheckBox            _show_domain_architectures;
-    private JCheckBox            _show_events;
-    private JCheckBox            _show_gene_names;
-    private JCheckBox            _show_node_names;
-    private JCheckBox            _show_properties_cb;
-    private JCheckBox            _show_seq_names;
-    private JCheckBox            _show_seq_symbols;
-    private JCheckBox            _show_sequence_acc;
-    private JComboBox<String>            _show_sequence_relations;
-    private JCheckBox            _show_taxo_code;
-    private JCheckBox            _show_taxo_common_names;
-    private JCheckBox            _show_taxo_images_cb;
-    private JCheckBox            _show_taxo_scientific_names;
-    private JCheckBox            _show_vector_data_cb;
-    private JButton              _show_whole;
-    private int                  _sort_descendents_item;
-    private Map<String, Color>   _species_colors;
-    private Map<String, Color>   _sequence_colors;
-    private int                  _subtree_cb_item;
-    private int                  _swap_cb_item;
-    private JButton              _uncollapse_all;
-    private JCheckBox            _width_branches;
-    private JCheckBox            _write_confidence;
-    private JButton              _zoom_in_domain_structure;
+    private int                               _show_data_item;
+    private JCheckBox                         _show_domain_architectures;
+    private JCheckBox                         _show_events;
+    private JCheckBox                         _show_gene_names;
+    private JCheckBox                         _show_node_names;
+    private JCheckBox                         _show_properties_cb;
+    private JCheckBox                         _show_seq_names;
+    private JCheckBox                         _show_seq_symbols;
+    private JCheckBox                         _show_sequence_acc;
+    private JComboBox<String>                 _show_sequence_relations;
+    private JCheckBox                         _show_taxo_code;
+    private JCheckBox                         _show_taxo_common_names;
+    private JCheckBox                         _show_taxo_images_cb;
+    private JCheckBox                         _show_taxo_scientific_names;
+    private JCheckBox                         _show_vector_data_cb;
+    private JButton                           _show_whole;
+    private int                               _sort_descendents_item;
+    private Map<String, Color>                _species_colors;
+    private Map<String, Color>                _sequence_colors;
+    private int                               _subtree_cb_item;
+    private int                               _swap_cb_item;
+    private JButton                           _uncollapse_all;
+    private JCheckBox                         _width_branches;
+    private JCheckBox                         _write_confidence;
+    private JButton                           _zoom_in_domain_structure;
     // zooming and quick tree manipulation buttons:
-    private JButton              _zoom_in_x;
-    private JButton              _zoom_in_y;
-    private JLabel               _zoom_label;
-    private JButton              _zoom_out_domain_structure;
-    private JButton              _zoom_out_x;
-    private JButton              _zoom_out_y;
+    private JButton                           _zoom_in_x;
+    private JButton                           _zoom_in_y;
+    private JLabel                            _zoom_label;
+    private JButton                           _zoom_out_domain_structure;
+    private JButton                           _zoom_out_x;
+    private JButton                           _zoom_out_y;
 
     ControlPanel( final MainPanel ap, final Configuration configuration ) {
         init();
@@ -193,18 +193,15 @@ final class ControlPanel extends JPanel implements ActionListener {
     public void actionPerformed( final ActionEvent e ) {
         try {
             if ( e.getSource() == _color_acc_sequence ) {
-                if ( _color_acc_species != null  ) {
+                if ( _color_acc_species != null ) {
                     _color_acc_species.setSelected( false );
                 }
-             }
+            }
             else if ( e.getSource() == _color_acc_species ) {
-                if ( _color_acc_sequence != null  ) {
+                if ( _color_acc_sequence != null ) {
                     _color_acc_sequence.setSelected( false );
                 }
-                
             }
-            
-            
             final TreePanel tp = getMainPanel().getCurrentTreePanel();
             if ( tp == null ) {
                 return;
@@ -307,7 +304,8 @@ final class ControlPanel extends JPanel implements ActionListener {
                     search1();
                     displayedPhylogenyMightHaveChanged( true );
                 }
-                else if ( _dynamically_hide_data != null &&  e.getSource() == _dynamically_hide_data && !_dynamically_hide_data.isSelected() ) {
+                else if ( ( _dynamically_hide_data != null ) && ( e.getSource() == _dynamically_hide_data )
+                        && !_dynamically_hide_data.isSelected() ) {
                     setDynamicHidingIsOn( false );
                     displayedPhylogenyMightHaveChanged( true );
                 }
@@ -330,7 +328,7 @@ final class ControlPanel extends JPanel implements ActionListener {
     public JCheckBox getColorAccSpeciesCb() {
         return _color_acc_species;
     }
-    
+
     public JCheckBox getColorAccSequenceCb() {
         return _color_acc_sequence;
     }
@@ -555,15 +553,13 @@ final class ControlPanel extends JPanel implements ActionListener {
                 break;
             case Configuration.color_according_to_species:
                 _color_acc_species = new JCheckBox( title );
-                _color_acc_species
-                        .setToolTipText( "To colorize node labels as a function of taxonomy" );
+                _color_acc_species.setToolTipText( "To colorize node labels as a function of taxonomy" );
                 addJCheckBox( _color_acc_species, ch_panel );
                 add( ch_panel );
                 break;
             case Configuration.color_according_to_sequence:
                 _color_acc_sequence = new JCheckBox( title );
-                _color_acc_sequence
-                        .setToolTipText( "To colorize node labels as a function of sequence name" );
+                _color_acc_sequence.setToolTipText( "To colorize node labels as a function of sequence name" );
                 addJCheckBox( _color_acc_sequence, ch_panel );
                 add( ch_panel );
                 break;
@@ -821,7 +817,7 @@ final class ControlPanel extends JPanel implements ActionListener {
     Map<String, Color> getSpeciesColors() {
         return _species_colors;
     }
-    
+
     Map<String, Color> getSequenceColors() {
         return _sequence_colors;
     }
@@ -837,7 +833,7 @@ final class ControlPanel extends JPanel implements ActionListener {
     boolean isColorAccordingToTaxonomy() {
         return ( ( _color_acc_species != null ) && _color_acc_species.isSelected() );
     }
-    
+
     boolean isColorAccordingToSequence() {
         return ( ( _color_acc_sequence != null ) && _color_acc_sequence.isSelected() );
     }
@@ -1272,7 +1268,7 @@ final class ControlPanel extends JPanel implements ActionListener {
     void setSpeciesColors( final Map<String, Color> species_colors ) {
         _species_colors = species_colors;
     }
-    
+
     void setSequenceColors( final Map<String, Color> sequence_colors ) {
         _sequence_colors = sequence_colors;
     }
@@ -2054,8 +2050,8 @@ final class ControlPanel extends JPanel implements ActionListener {
                         s = "User Selected Data";
                         break;
                     default:
-                        throw new IllegalStateException( "dont know how to deal with " + getConfiguration().getExtDescNodeDataToReturn() );
-                        
+                        throw new IllegalStateException( "dont know how to deal with "
+                                + getConfiguration().getExtDescNodeDataToReturn() );
                 }
                 final String label = _configuration.getClickToTitle( Configuration.get_ext_desc_data ) + " " + s;
                 addClickToOption( Configuration.get_ext_desc_data, label );
@@ -2148,18 +2144,12 @@ final class ControlPanel extends JPanel implements ActionListener {
             setCheckbox( Configuration.display_internal_data,
                          _configuration.doCheckOption( Configuration.display_internal_data ) );
         }
-        
-        
         if ( _configuration.doDisplayOption( Configuration.color_according_to_sequence ) ) {
             addCheckbox( Configuration.color_according_to_sequence,
                          _configuration.getDisplayTitle( Configuration.color_according_to_sequence ) );
             setCheckbox( Configuration.color_according_to_sequence,
                          _configuration.doCheckOption( Configuration.color_according_to_sequence ) );
         }
-        
-        
-        
-        
         if ( _configuration.doDisplayOption( Configuration.color_according_to_species ) ) {
             addCheckbox( Configuration.color_according_to_species,
                          _configuration.getDisplayTitle( Configuration.color_according_to_species ) );
index 2a50296..ef2ebcb 100644 (file)
@@ -125,8 +125,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     static final String         USE_BRACKETS_FOR_CONF_IN_NH_LABEL       = "Use Brackets for Confidence Values";\r
     static final String         USE_INTERNAL_NAMES_FOR_CONF_IN_NH_LABEL = "Use Internal Node Names for Confidence Values";\r
     static final String         SHOW_BASIC_TREE_INFORMATION_LABEL       = "Basic Tree Information";\r
-    static final String RIGHT_LINE_UP_DOMAINS = "Right-align Domain Architectures";\r
-    static final String LINE_UP_RENDERABLE_DATA = "Line Up Node Diagrams";\r
+    static final String         RIGHT_LINE_UP_DOMAINS                   = "Right-align Domain Architectures";\r
+    static final String         LINE_UP_RENDERABLE_DATA                 = "Line Up Node Diagrams";\r
     JMenuBar                    _jmenubar;\r
     JMenu                       _file_jmenu;\r
     JMenu                       _tools_menu;\r
@@ -200,8 +200,8 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     JMenuItem                   _cycle_node_fill_mi;\r
     JMenuItem                   _choose_node_size_mi;\r
     JCheckBoxMenuItem           _show_confidence_stddev_cbmi;\r
-   JCheckBoxMenuItem _right_line_up_domains_cbmi;\r
-    JCheckBoxMenuItem _line_up_renderable_data_cbmi;\r
+    JCheckBoxMenuItem           _right_line_up_domains_cbmi;\r
+    JCheckBoxMenuItem           _line_up_renderable_data_cbmi;\r
     // _  print\r
     JCheckBoxMenuItem           _graphics_export_visible_only_cbmi;\r
     JCheckBoxMenuItem           _antialias_print_cbmi;\r
@@ -502,14 +502,11 @@ public abstract class MainFrame extends JFrame implements ActionListener {
             }\r
             updateOptions( getOptions() );\r
         }\r
-        \r
-        \r
         else if ( ( o == _rectangular_type_cbmi ) || ( o == _triangular_type_cbmi ) || ( o == _curved_type_cbmi )\r
                 || ( o == _convex_type_cbmi ) || ( o == _euro_type_cbmi ) || ( o == _rounded_type_cbmi )\r
                 || ( o == _unrooted_type_cbmi ) || ( o == _circular_type_cbmi ) ) {\r
             typeChanged( o );\r
         }\r
-        \r
         else if ( o == _about_item ) {\r
             about();\r
         }\r
@@ -553,7 +550,6 @@ public abstract class MainFrame extends JFrame implements ActionListener {
                 ForesterUtil.printErrorMessage( Constants.PRG_NAME, e1.toString() );\r
             }\r
         }\r
-       \r
         else {\r
             if ( _load_phylogeny_from_webservice_menu_items != null ) {\r
                 for( int i = 0; i < _load_phylogeny_from_webservice_menu_items.length; ++i ) {\r
@@ -566,21 +562,20 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         _contentpane.repaint();\r
     }\r
 \r
-    private void deleteSelectedNodes( boolean delete ) {\r
+    private void deleteSelectedNodes( final boolean delete ) {\r
         final Phylogeny phy = getMainPanel().getCurrentPhylogeny();\r
-        if ( phy == null || phy.getNumberOfExternalNodes() < 2 ) {\r
+        if ( ( phy == null ) || ( phy.getNumberOfExternalNodes() < 2 ) ) {\r
             return;\r
         }\r
-        List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
+        final List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
         if ( ( getCurrentTreePanel().getFoundNodes0() != null ) || ( getCurrentTreePanel().getFoundNodes1() != null ) ) {\r
-            final List<PhylogenyNode>  all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
+            final List<PhylogenyNode> all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
             for( final PhylogenyNode n : all_selected_nodes ) {\r
                 if ( n.isExternal() ) {\r
                     nodes.add( n );\r
                 }\r
             }\r
         }\r
-        \r
         String function = "Retain";\r
         if ( delete ) {\r
             function = "Delete";\r
@@ -1106,8 +1101,6 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         return _species_tree;\r
     }\r
 \r
-    \r
-\r
     void initializeTypeMenu( final Options options ) {\r
         setTypeMenuToAllUnselected();\r
         switch ( options.getPhylogenyGraphicsType() ) {\r
@@ -1426,7 +1419,6 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         }\r
         if ( ( _right_line_up_domains_cbmi != null ) && _right_line_up_domains_cbmi.isEnabled() ) {\r
             options.setRightLineUpDomains( _right_line_up_domains_cbmi.isSelected() );\r
-           \r
         }\r
         if ( ( _line_up_renderable_data_cbmi != null ) && _line_up_renderable_data_cbmi.isEnabled() ) {\r
             options.setLineUpRendarableNodeData( _line_up_renderable_data_cbmi.isSelected() );\r
index 22332cd..6e6db91 100644 (file)
@@ -222,7 +222,6 @@ public final class MainFrameApplet extends MainFrame {
             _options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );
         }
         _options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );
-        
         _options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( MainFrame.SHOW_ANN_REF_SOURCE_LABEL ) );
         _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_CONF_STDDEV_LABEL ) );
         _options_jmenu
index 9c4c701..6ad71f3 100644 (file)
@@ -157,7 +157,6 @@ public final class MainFrameApplication extends MainFrame {
     private File                             _seqs_file                            = null;\r
     JMenuItem                                _read_values_jmi;\r
     JMenuItem                                _read_seqs_jmi;\r
-   \r
 \r
     private MainFrameApplication( final Phylogeny[] phys, final Configuration config ) {\r
         _configuration = config;\r
@@ -902,9 +901,8 @@ public final class MainFrameApplication extends MainFrame {
         if ( getConfiguration().doDisplayOption( Configuration.show_domain_architectures ) ) {\r
             _options_jmenu.add( _show_domain_labels = new JCheckBoxMenuItem( SHOW_DOMAIN_LABELS_LABEL ) );\r
             _options_jmenu.add( _right_line_up_domains_cbmi = new JCheckBoxMenuItem( MainFrame.RIGHT_LINE_UP_DOMAINS ) );\r
-         }\r
+        }\r
         _options_jmenu.add( _line_up_renderable_data_cbmi = new JCheckBoxMenuItem( MainFrame.LINE_UP_RENDERABLE_DATA ) );\r
\r
         _options_jmenu.add( _show_annotation_ref_source = new JCheckBoxMenuItem( SHOW_ANN_REF_SOURCE_LABEL ) );\r
         _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( SHOW_CONF_STDDEV_LABEL ) );\r
         _options_jmenu.add( _color_by_taxonomic_group_cbmi = new JCheckBoxMenuItem( COLOR_BY_TAXONOMIC_GROUP ) );\r
@@ -1033,11 +1031,7 @@ public final class MainFrameApplication extends MainFrame {
                 .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS );\r
         customizeCheckBoxMenuItem( _use_internal_names_for_conf_in_nh_export_cbmi, getOptions()\r
                 .getNhConversionSupportValueStyle() == NH_CONVERSION_SUPPORT_VALUE_STYLE.AS_INTERNAL_NODE_NAMES );\r
-      \r
-        \r
-        customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData()\r
-                                    );\r
-        \r
+        customizeCheckBoxMenuItem( _line_up_renderable_data_cbmi, getOptions().isLineUpRendarableNodeData() );\r
         customizeCheckBoxMenuItem( _right_line_up_domains_cbmi, getOptions().isRightLineUpDomains() );\r
         _jmenubar.add( _options_jmenu );\r
     }\r
@@ -1092,7 +1086,6 @@ public final class MainFrameApplication extends MainFrame {
         customizeJMenuItem( _delete_selected_nodes_item );\r
         _tools_menu.add( _delete_not_selected_nodes_item = new JMenuItem( "Retain Selected Nodes" ) );\r
         _delete_not_selected_nodes_item.setToolTipText( "To delete all not selected external nodes" );\r
-        \r
         customizeJMenuItem( _delete_not_selected_nodes_item );\r
         _tools_menu.addSeparator();\r
         _tools_menu.add( _collapse_species_specific_subtrees = new JMenuItem( "Collapse Species-Specific Subtrees" ) );\r
@@ -1247,7 +1240,6 @@ public final class MainFrameApplication extends MainFrame {
             if ( ( phys != null ) && ( phys.length > 0 ) ) {\r
                 if ( nhx_or_nexus && getOptions().isInternalNumberAreConfidenceForNhParsing() ) {\r
                     for( final Phylogeny phy : phys ) {\r
-                        \r
                         PhylogenyMethods.transferInternalNodeNamesToConfidence( phy, "" );\r
                     }\r
                 }\r
index 4d96164..2bf8471 100644 (file)
@@ -35,7 +35,6 @@ import org.forester.phylogeny.data.NodeVisualData;
 import org.forester.phylogeny.data.NodeVisualData.NodeFill;
 import org.forester.phylogeny.data.NodeVisualData.NodeShape;
 import org.forester.util.ForesterUtil;
-import org.omg.stub.java.rmi._Remote_Stub;
 
 /*
  * This is to hold changeable options.
@@ -86,8 +85,8 @@ final public class Options {
     private boolean                           _show_overview;
     private boolean                           _show_scale;
     private TAXONOMY_EXTRACTION               _taxonomy_extraction;
-    private boolean _line_up_renderable_node_data;
-    private boolean _right_align_domains;
+    private boolean                           _line_up_renderable_node_data;
+    private boolean                           _right_align_domains;
 
     private Options() {
         init();
@@ -566,9 +565,8 @@ final public class Options {
             if ( configuration.getExtDescNodeDataToReturn() != null ) {
                 instance.setExtDescNodeDataToReturn( configuration.getExtDescNodeDataToReturn() );
             }
-            
-            instance.setRightLineUpDomains(  configuration.isRightLineUpDomains() );
-            instance.setLineUpRendarableNodeData(  configuration.isLineUpRendarableNodeData() );
+            instance.setRightLineUpDomains( configuration.isRightLineUpDomains() );
+            instance.setLineUpRendarableNodeData( configuration.isLineUpRendarableNodeData() );
             instance.setAllowErrorsInDistanceToParent( false );
         }
         return instance;
@@ -613,23 +611,18 @@ final public class Options {
     }
 
     final public boolean isLineUpRendarableNodeData() {
-       
         return _line_up_renderable_node_data;
     }
-    
+
     final public boolean isRightLineUpDomains() {
-        
         return _right_align_domains;
     }
-    
-    final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data) {
-        
-         _line_up_renderable_node_data = line_up_renderable_node_data;
+
+    final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data ) {
+        _line_up_renderable_node_data = line_up_renderable_node_data;
     }
-    
+
     final public void setRightLineUpDomains( final boolean right_align_domains ) {
-        
         _right_align_domains = right_align_domains;
     }
-    
 }
index 53650d5..2906ae7 100644 (file)
@@ -31,7 +31,6 @@ import java.util.Map;
 
 import org.forester.util.ForesterUtil;
 
-
 public final class TreeColorSet {
 
     public static final String ANNOTATION                 = "Annotation";
@@ -60,9 +59,7 @@ public final class TreeColorSet {
             BINARY_DOMAIN_COMBINATIONS, ANNOTATION, OVERVIEW };
     static final String[]      SCHEME_NAMES               = { "Default", "Black", "Black & White", "Silver", "Green",
             "White & Blue", "Cyan", "Orange", "Blue", "Blue & White", "Neon" };
-   
     private int                _color_scheme;
-   
     private final Color[][]    _color_schemes             = { { new Color( 0, 0, 0 ), // background_color
             new Color( 0, 100, 100 ), // background_color_gradient_bottom
             new Color( 230, 230, 230 ), // sequence  __ Default (same as Black)
@@ -218,8 +215,8 @@ public final class TreeColorSet {
             new Color( 255, 0, 0 ), // duplication_box_color
             new Color( 0, 255, 0 ), // speciation_box_color
             new Color( 255, 255, 0 ), // duplication_speciation_color
-            new Color( 255, 200, 0  ), // domain_label  
-            new Color( 255, 200, 0  ), // domains_base  
+            new Color( 255, 200, 0 ), // domain_label  
+            new Color( 255, 200, 0 ), // domains_base  
             new Color( 150, 150, 150 ), // binary_domain_combinations_color
             new Color( 150, 150, 150 ) // annotation
             , new Color( 150, 150, 150 ) // ov
@@ -238,7 +235,7 @@ public final class TreeColorSet {
             new Color( 255, 0, 0 ), // duplication_box_color
             new Color( 0, 255, 0 ), // speciation_box_color
             new Color( 255, 255, 0 ), // duplication_speciation_color
-            new Color(255, 255, 255 ), // domain_label  
+            new Color( 255, 255, 255 ), // domain_label  
             new Color( 100, 100, 100 ), // domains_base  
             new Color( 255, 255, 255 ), // binary_domain_combinations_color
             new Color( 255, 255, 255 ) // annotation
@@ -279,7 +276,7 @@ public final class TreeColorSet {
             new Color( 0, 255, 0 ), // speciation_box_color
             new Color( 255, 255, 0 ), // duplication_speciation_color
             new Color( 127, 255, 0 ), // domain_label  
-            new Color(  234, 173, 234 ), // domains_base  
+            new Color( 234, 173, 234 ), // domains_base  
             new Color( 27, 255, 0 ), // binary_domain_combinations_color
             new Color( 27, 255, 0 ) // annotation
             , new Color( 77, 77, 255 ) // ov
@@ -377,7 +374,7 @@ public final class TreeColorSet {
     public Color getDomainBaseColor() {
         return domain_base_color;
     }
-    
+
     public Color getDomainLabelColor() {
         return domain_label_color;
     }
index 4178b2a..a4c7821 100644 (file)
@@ -4797,16 +4797,17 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 if ( getControlPanel().isDrawPhylogram() ) {
                     if ( getOptions().isLineUpRendarableNodeData() ) {
                         if ( getOptions().isRightLineUpDomains() ) {
-                            rds.render( getMaxDistanceToRoot() * getXcorrectionFactor() + _length_of_longest_text
-                                                + ( _longest_domain - rds.getTotalLength() )
-                                                * rds.getRenderingFactorWidth(),
+                            rds.render( ( getMaxDistanceToRoot() * getXcorrectionFactor() )
+                                                + _length_of_longest_text
+                                                + ( ( _longest_domain - rds.getTotalLength() ) * rds
+                                                        .getRenderingFactorWidth() ),
                                         node.getYcoord() - ( h / 2 ),
                                         g,
                                         this,
                                         to_pdf );
                         }
                         else {
-                            rds.render( getMaxDistanceToRoot() * getXcorrectionFactor() + _length_of_longest_text,
+                            rds.render( ( getMaxDistanceToRoot() * getXcorrectionFactor() ) + _length_of_longest_text,
                                         node.getYcoord() - ( h / 2 ),
                                         g,
                                         this,
@@ -4819,9 +4820,9 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 }
                 else {
                     if ( getOptions().isRightLineUpDomains() ) {
-                        rds.render( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text
-                                            - 20 + ( _longest_domain - rds.getTotalLength() ) 
-                                            * rds.getRenderingFactorWidth(),
+                        rds.render( ( ( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text ) - 20 )
+                                            + ( ( _longest_domain - rds.getTotalLength() ) * rds
+                                                    .getRenderingFactorWidth() ),
                                     node.getYcoord() - ( h / 2 ),
                                     g,
                                     this,
index e131214..6f6999d 100644 (file)
@@ -296,7 +296,7 @@ public class TreePanelUtil {
             if ( n.getNodeData().isHasTaxonomy()
                     && ( !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getScientificName() )
                             || !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getCommonName() ) || !ForesterUtil
-                            .isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) ) {
+                                .isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) ) {
                 if ( !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getRank() )
                         && n.getNodeData().getTaxonomy().getRank().equalsIgnoreCase( rank ) ) {
                     final BranchColor c = new BranchColor( tree_panel.calculateTaxonomyBasedColor( n.getNodeData()
@@ -397,7 +397,7 @@ public class TreePanelUtil {
                 if ( sb.charAt( sb.length() - 1 ) == ' ' ) {
                     sb.deleteCharAt( sb.length() - 1 );
                 }
-                if ( i < ans.size() - 1 ) {
+                if ( i < ( ans.size() - 1 ) ) {
                     sb.append( ", " );
                 }
             }
index 84de7d3..9536554 100644 (file)
@@ -47,7 +47,7 @@ public interface RenderablePhylogenyData extends PhylogenyData {
      * @param g
      *            the Graphics to render to
      */
-    public void render( final double x, final double y, final Graphics2D g, final TreePanel tree_panel, boolean to_pdf  );
+    public void render( final double x, final double y, final Graphics2D g, final TreePanel tree_panel, boolean to_pdf );
 
     public void setParameter( final double parameter );
 
index 02782ff..b084491 100644 (file)
@@ -43,22 +43,19 @@ import org.forester.util.ForesterUtil;
 
 public final class RenderableVector implements RenderablePhylogenyData {
 
-    final static int         VECTOR_DEFAULT_HEIGHT          = 12;
-    public final static  int         VECTOR_DEFAULT_WIDTH           = 120;
+    final static int                VECTOR_DEFAULT_HEIGHT   = 12;
+    public final static int         VECTOR_DEFAULT_WIDTH    = 120;
     private double                  _rendering_factor_width = 1.0;
     private List<Double>            _values;
     private final Rectangle2D       _rectangle              = new Rectangle2D.Float();
-   
-    private double                  _height =  VECTOR_DEFAULT_HEIGHT;
+    private double                  _height                 = VECTOR_DEFAULT_HEIGHT;
     private double                  _min;
     private double                  _max;
     private double                  _mean;
-    private  Color _min_color = Color.BLUE;
-    private  Color _max_color = Color.YELLOW;
-    private  Color _mean_color = Color.WHITE;
-    private  int _width = VECTOR_DEFAULT_WIDTH;
-    
-    
+    private Color                   _min_color              = Color.BLUE;
+    private Color                   _max_color              = Color.YELLOW;
+    private Color                   _mean_color             = Color.WHITE;
+    private int                     _width                  = VECTOR_DEFAULT_WIDTH;
     private static RenderableVector _instance               = null;
 
     private RenderableVector() {
@@ -167,18 +164,14 @@ public final class RenderableVector implements RenderablePhylogenyData {
         if ( _instance == null ) {
             _instance = new RenderableVector();
         }
-       
         _instance._values = values;
-        
         if ( configuration != null ) {
-            _instance._min_color =configuration.getVectorDataMinColor();
+            _instance._min_color = configuration.getVectorDataMinColor();
             _instance._max_color = configuration.getVectorDataMaxColor();
             _instance._mean_color = configuration.getVectorDataMeanColor();
             _instance._width = configuration.getVectorDataWidth();
             _instance._height = configuration.getVectorDataHeight();
         }
-        
-        
         if ( stats.getN() > 0 ) {
             _instance._min = stats.getMin();
             _instance._max = stats.getMax();
index 156d72e..1f06010 100644 (file)
@@ -137,21 +137,21 @@ public final class NeighborJoining {
             final int m_i = _mappings[ i ];
             if ( otu1 < i ) {
                 if ( otu2 > i ) {
-                    _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+                    _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
                     //System.out.print( DF.format( _d_values[ m_otu1 ][ m_i ] ) );
                 }
                 else {
-                    _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+                    _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
                     //System.out.print( DF.format( _d_values[ m_otu1 ][ m_i ] ) );
                 }
             }
             else {
                 if ( otu2 > i ) {
-                    _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+                    _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
                     //System.out.print( DF.format( _d_values[ m_i ][ m_otu1 ] ) );
                 }
                 else {
-                    _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+                    _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
                     // System.out.print( DF.format( _d_values[ m_otu1 ][ m_i ] ) );
                 }
             }
index a696a38..ff35f4a 100644 (file)
@@ -135,18 +135,18 @@ public final class NeighborJoiningF {
             final int m_i = _mappings[ i ];
             if ( otu1 < i ) {
                 if ( otu2 > i ) {
-                    _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+                    _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
                 }
                 else {
-                    _d_values[ m_otu1 ][ m_i ] = ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+                    _d_values[ m_otu1 ][ m_i ] = ( ( _d_values[ m_otu1 ][ m_i ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
                 }
             }
             else {
                 if ( otu2 > i ) {
-                    _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] - d ) / 2;
+                    _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_i ][ m_otu2 ] ) - d ) / 2;
                 }
                 else {
-                    _d_values[ m_i ][ m_otu1 ] = ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] - d ) / 2;
+                    _d_values[ m_i ][ m_otu1 ] = ( ( _d_values[ m_i ][ m_otu1 ] + _d_values[ m_otu2 ][ m_i ] ) - d ) / 2;
                 }
             }
         }
index be18018..081be11 100644 (file)
@@ -183,12 +183,12 @@ public final class NeighborJoiningR {
         }
         double new_d;
         if ( otu1 < mj ) {
-            new_d = ( _d_values[ otu1 ][ mj ] + getDvalue( j, otu2 ) - d ) / 2;
+            new_d = ( ( _d_values[ otu1 ][ mj ] + getDvalue( j, otu2 ) ) - d ) / 2;
             _s.addPairing( new_d, otu1, mj );
             _d_values[ otu1 ][ mj ] = new_d;
         }
         else {
-            new_d = ( _d_values[ mj ][ otu1 ] + getDvalue( j, otu2 ) - d ) / 2;
+            new_d = ( ( _d_values[ mj ][ otu1 ] + getDvalue( j, otu2 ) ) - d ) / 2;
             _s.addPairing( new_d, mj, otu1 );
             _d_values[ mj ][ otu1 ] = new_d;
         }
index b044015..6e30f5c 100644 (file)
@@ -133,7 +133,7 @@ public final class Sarray {
         }
         else {
             final int[] x = new int[ m.get( key ).length + 1 ];
-            for( int i = 0; i < x.length - 1; i++ ) {
+            for( int i = 0; i < ( x.length - 1 ); i++ ) {
                 x[ i ] = m.get( key )[ i ];
             }
             x[ x.length - 1 ] = value;
index 690c5f1..270f31a 100644 (file)
@@ -133,7 +133,7 @@ public class BasicGoRelationship implements GoRelationship {
             case HAS_PART:
                 sb.append( HAS_PART_STR );
                 break;
-            case OCCURS_IN:    
+            case OCCURS_IN:
                 sb.append( OCCURS_IN_STR );
                 break;
             default:
index f46dd50..a219ab0 100644 (file)
@@ -32,7 +32,7 @@ public interface GoRelationship extends Comparable<GoRelationship> {
     public static final String NEGATIVELY_REGULATES_STR = "negatively_regulates";
     public static final String POSITIVELY_REGULATES_STR = "positively_regulates";
     public static final String HAS_PART_STR             = "has_part";
-    public static final String OCCURS_IN_STR             ="occurs_in";
+    public static final String OCCURS_IN_STR            = "occurs_in";
 
     public GoId getGoId();
 
index 172ce4d..fee7bd3 100644 (file)
@@ -119,9 +119,9 @@ public final class DeleteableMsa extends BasicMsa {
             s = getSequence( row );
             final char[] x = s.getMolecularSequence();
             sb = new StringBuilder( x.length );
-            for( int i = 0; i < x.length; ++i ) {
-                if ( x[ i ] != Sequence.GAP ) {
-                    sb.append( x[ i ] );
+            for( final char element : x ) {
+                if ( element != Sequence.GAP ) {
+                    sb.append( element );
                 }
             }
         }
@@ -200,7 +200,7 @@ public final class DeleteableMsa extends BasicMsa {
 
     final private void deleteColumn( final int col ) {
         checkColumn( col );
-        for( int c = col; c < _length - 1; ++c ) {
+        for( int c = col; c < ( _length - 1 ); ++c ) {
             _mapped_col_positions[ c ] = _mapped_col_positions[ c + 1 ];
         }
         --_length;
@@ -208,7 +208,7 @@ public final class DeleteableMsa extends BasicMsa {
 
     final private void deleteRow( final int row ) {
         checkRow( row );
-        for( int r = row; r < _seqs - 1; ++r ) {
+        for( int r = row; r < ( _seqs - 1 ); ++r ) {
             _mapped_row_positions[ r ] = _mapped_row_positions[ r + 1 ];
         }
         --_seqs;
index eba76de..9e0c782 100644 (file)
@@ -277,7 +277,7 @@ public class PhylogenyMethods {
         }\r
         return max;\r
     }\r
-    \r
+\r
     public static PhylogenyNode calculateNodeWithMaxDistanceToRoot( final Phylogeny phy ) {\r
         double max = 0.0;\r
         PhylogenyNode max_node = phy.getFirstExternalNode();\r
index add11c9..ab6f055 100644 (file)
@@ -279,7 +279,7 @@ public class NodeData implements PhylogenyData {
         return ( getDate() != null )
                 && ( !ForesterUtil.isEmpty( getDate().getDesc() ) || !ForesterUtil.isNull( getDate().getMax() )
                         || !ForesterUtil.isNull( getDate().getMin() ) || !ForesterUtil.isNull( getDate().getValue() ) || !ForesterUtil
-                        .isEmpty( getDate().getUnit() ) );
+                            .isEmpty( getDate().getUnit() ) );
     }
 
     public boolean isHasDistribution() {
index 2e15149..955e298 100644 (file)
@@ -249,7 +249,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable<Taxonom
     public boolean isEmpty() {
         return ( ( getIdentifier() == null ) && ForesterUtil.isEmpty( getTaxonomyCode() )
                 && ForesterUtil.isEmpty( getCommonName() ) && ForesterUtil.isEmpty( getScientificName() ) && ForesterUtil
-                .isEmpty( _lineage ) );
+                    .isEmpty( _lineage ) );
     }
 
     /**
index 0de8e9a..1f4f3e6 100644 (file)
@@ -273,7 +273,7 @@ public final class RIO {
             first = 0;
         }
         if ( log() ) {
-            postLog( species_tree, first, first + counter - 1 );
+            postLog( species_tree, first, ( first + counter ) - 1 );
         }
         if ( _verbose ) {
             System.out.println();
index fabf400..5ce76fb 100644 (file)
@@ -66,7 +66,7 @@ public class AdjactantDirectedBinaryDomainCombination extends BasicBinaryDomainC
             final AdjactantDirectedBinaryDomainCombination dc = new AdjactantDirectedBinaryDomainCombination( n_terminal,
                                                                                                               c_terminal );
             ADDC_POOL.put( code, dc );
-            if ( VERBOSE && ( ADDC_POOL.size() % 100 == 0 ) ) {
+            if ( VERBOSE && ( ( ADDC_POOL.size() % 100 ) == 0 ) ) {
                 System.out.println( " addc pool size: " + ADDC_POOL.size() );
             }
             return dc;
index 49fc07e..b5844a1 100644 (file)
@@ -206,7 +206,7 @@ public class BasicBinaryDomainCombination implements BinaryDomainCombination {
         else {
             final BasicBinaryDomainCombination dc = new BasicBinaryDomainCombination( id0, id1 );
             DC_POOL.put( code, dc );
-            if ( VERBOSE && ( DC_POOL.size() % 100 == 0 ) ) {
+            if ( VERBOSE && ( ( DC_POOL.size() % 100 ) == 0 ) ) {
                 System.out.println( " dc pool size: " + DC_POOL.size() );
             }
             return dc;
index a309603..10e47cd 100644 (file)
@@ -64,7 +64,7 @@ public class DirectedBinaryDomainCombination extends BasicBinaryDomainCombinatio
         else {
             final DirectedBinaryDomainCombination dc = new DirectedBinaryDomainCombination( n_terminal, c_terminal );
             DDC_POOL.put( code, dc );
-            if ( VERBOSE && ( DDC_POOL.size() % 100 == 0 ) ) {
+            if ( VERBOSE && ( ( DDC_POOL.size() % 100 ) == 0 ) ) {
                 System.out.println( " ddc pool size: " + DDC_POOL.size() );
             }
             return dc;
index 72d03f1..144e3b8 100644 (file)
@@ -159,6 +159,7 @@ public class DomainSimilarity implements Comparable<DomainSimilarity> {
         }
     }
 
+    @Override
     public int compareTo( final DomainSimilarity domain_similarity ) {
         if ( this == domain_similarity ) {
             return EQUAL;
@@ -629,6 +630,7 @@ public class DomainSimilarity implements Comparable<DomainSimilarity> {
             _base = base;
         }
 
+        @Override
         public int compare( final String a, final String b ) {
             if ( _base.get( a ) >= _base.get( b ) ) {
                 return -1;