refactored
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 20 Apr 2011 22:27:40 +0000 (22:27 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 20 Apr 2011 22:27:40 +0000 (22:27 +0000)
17 files changed:
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/archaeopteryx/MainFrame.java
forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java
forester/java/src/org/forester/archaeopteryx/MainPanel.java
forester/java/src/org/forester/archaeopteryx/NodeEditPanel.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/archaeopteryx/Util.java
forester/java/src/org/forester/archaeopteryx/tools/AncestralTaxonomyInferrer.java [moved from forester/java/src/org/forester/archaeopteryx/AncestralTaxonomyInferrer.java with 95% similarity]
forester/java/src/org/forester/archaeopteryx/tools/Blast.java [moved from forester/java/src/org/forester/archaeopteryx/Blast.java with 98% similarity]
forester/java/src/org/forester/archaeopteryx/tools/GoAnnotation.java [moved from forester/java/src/org/forester/archaeopteryx/MainPanelEdit.java with 95% similarity]
forester/java/src/org/forester/archaeopteryx/tools/ImageLoader.java [moved from forester/java/src/org/forester/archaeopteryx/ImageLoader.java with 96% similarity]
forester/java/src/org/forester/archaeopteryx/tools/PhyloInferenceDialog.java [moved from forester/java/src/org/forester/archaeopteryx/PhyloInferenceDialog.java with 99% similarity]
forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferenceOptions.java [moved from forester/java/src/org/forester/archaeopteryx/PhylogeneticInferenceOptions.java with 99% similarity]
forester/java/src/org/forester/archaeopteryx/tools/PhylogeneticInferrer.java [moved from forester/java/src/org/forester/archaeopteryx/PhylogeneticInferrer.java with 99% similarity]
forester/java/src/org/forester/archaeopteryx/tools/TaxonomyDataObtainer.java [moved from forester/java/src/org/forester/archaeopteryx/TaxonomyDataObtainer.java with 95% similarity]
forester/java/src/org/forester/archaeopteryx/tools/UniProtSequenceObtainer.java [moved from forester/java/src/org/forester/archaeopteryx/UniProtSequenceObtainer.java with 96% similarity]

index 12e108f..0e6b05f 100644 (file)
@@ -464,7 +464,7 @@ public final class Configuration {
         return _graphics_export_y;
     }
 
-    int getDefaultBootstrapSamples() {
+    public int getDefaultBootstrapSamples() {
         return _default_bootstrap_samples;
     }
 
index e388a7a..05ae5ac 100644 (file)
@@ -37,9 +37,9 @@ import org.forester.util.ForesterConstants;
 public final class Constants {
 
     final static boolean        __ALLOW_PHYLOGENETIC_INFERENCE                                = true;
-    final static boolean        __RELEASE                                                     = false;                                                    // TODO remove me
-    final static boolean        __SNAPSHOT_RELEASE                                            = false;                                                    // TODO remove me
-    final static String         PRG_NAME                                                      = "Archaeopteryx";
+    public final static boolean __RELEASE                                                     = false;                                                    // TODO remove me
+    public final static boolean __SNAPSHOT_RELEASE                                            = false;                                                    // TODO remove me
+    public final static String  PRG_NAME                                                      = "Archaeopteryx";
     final static String         VERSION                                                       = "0.960 beta A48";
     final static String         PRG_DATE                                                      = "2011.03.09";
     final static String         DEFAULT_CONFIGURATION_FILE_NAME                               = "_aptx_configuration_file";
index 6cb8d5b..13426a3 100644 (file)
@@ -659,7 +659,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         }
     }
 
-    Configuration getConfiguration() {
+    public Configuration getConfiguration() {
         return _configuration;
     }
 
@@ -794,7 +794,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         _circular_type_cbmi.setSelected( false );
     }
 
-    void showWhole() {
+    public void showWhole() {
         _mainpanel.getControlPanel().showWhole();
     }
 
index e5195c4..eea852c 100644 (file)
@@ -62,6 +62,13 @@ import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE;
 import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;
 import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;
 import org.forester.archaeopteryx.Util.GraphicsExportType;
+import org.forester.archaeopteryx.tools.AncestralTaxonomyInferrer;
+import org.forester.archaeopteryx.tools.GoAnnotation;
+import org.forester.archaeopteryx.tools.PhyloInferenceDialog;
+import org.forester.archaeopteryx.tools.PhylogeneticInferenceOptions;
+import org.forester.archaeopteryx.tools.PhylogeneticInferrer;
+import org.forester.archaeopteryx.tools.TaxonomyDataObtainer;
+import org.forester.archaeopteryx.tools.UniProtSequenceObtainer;
 import org.forester.archaeopteryx.webservices.PhylogeniesWebserviceClient;
 import org.forester.archaeopteryx.webservices.WebservicesManager;
 import org.forester.io.parsers.FastaParser;
@@ -1106,9 +1113,9 @@ public final class MainFrameApplication extends MainFrame {
         if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) {
             return;
         }
-        final MainPanelEdit a = new MainPanelEdit( this,
-                                                   _mainpanel.getCurrentTreePanel(),
-                                                   _mainpanel.getCurrentPhylogeny() );
+        final GoAnnotation a = new GoAnnotation( this,
+                                                 _mainpanel.getCurrentTreePanel(),
+                                                 _mainpanel.getCurrentPhylogeny() );
         new Thread( a ).start();
     }
 
@@ -1289,7 +1296,7 @@ public final class MainFrameApplication extends MainFrame {
     }
 
     @Override
-    MainPanel getMainPanel() {
+    public MainPanel getMainPanel() {
         return _mainpanel;
     }
 
@@ -1731,7 +1738,7 @@ public final class MainFrameApplication extends MainFrame {
         System.gc();
     }
 
-    void readSeqsFromFile() {
+    public void readSeqsFromFile() {
         // Set an initial directory if none set yet
         final File my_dir = getCurrentDir();
         _seqs_filechooser.setMultiSelectionEnabled( false );
@@ -1838,7 +1845,7 @@ public final class MainFrameApplication extends MainFrame {
         }
     }
 
-    void readMsaFromFile() {
+    public void readMsaFromFile() {
         // Set an initial directory if none set yet
         final File my_dir = getCurrentDir();
         _msa_filechooser.setMultiSelectionEnabled( false );
@@ -2501,7 +2508,7 @@ public final class MainFrameApplication extends MainFrame {
         return _phylogenetic_inference_options;
     }
 
-    Msa getMsa() {
+    public Msa getMsa() {
         return _msa;
     }
 
@@ -2513,11 +2520,11 @@ public final class MainFrameApplication extends MainFrame {
         _msa_file = msa_file;
     }
 
-    File getMsaFile() {
+    public File getMsaFile() {
         return _msa_file;
     }
 
-    List<Sequence> getSeqs() {
+    public List<Sequence> getSeqs() {
         return _seqs;
     }
 
@@ -2529,7 +2536,7 @@ public final class MainFrameApplication extends MainFrame {
         _seqs_file = seqs_file;
     }
 
-    File getSeqsFile() {
+    public File getSeqsFile() {
         return _seqs_file;
     }
 } // MainFrameApplication.
index 17335bd..6044baf 100644 (file)
@@ -85,10 +85,10 @@ public class MainPanel extends JPanel implements ComponentListener {
         getControlPanel().showWhole();
     }
 
-    void addPhylogenyInNewTab( final Phylogeny phy,
-                               final Configuration config,
-                               final String default_name,
-                               final String full_path ) {
+    public void addPhylogenyInNewTab( final Phylogeny phy,
+                                      final Configuration config,
+                                      final String default_name,
+                                      final String full_path ) {
         final TreePanel treepanel = new TreePanel( phy, config, this );
         getControlPanel().phylogenyAdded( config );
         treepanel.setControlPanel( getControlPanel() );
@@ -261,7 +261,7 @@ public class MainPanel extends JPanel implements ComponentListener {
         }
     }
 
-    TreePanel getCurrentTreePanel() {
+    public TreePanel getCurrentTreePanel() {
         final int selected = getTabbedPane().getSelectedIndex();
         if ( selected >= 0 ) {
             return _treepanels.get( selected );
index 9780d25..81e869d 100644 (file)
@@ -48,6 +48,7 @@ import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.TreePath;
 import javax.swing.tree.TreeSelectionModel;
 
+import org.forester.archaeopteryx.tools.ImageLoader;
 import org.forester.io.parsers.phyloxml.PhyloXmlDataFormatException;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Accession;
index e1bcfb7..00620cc 100644 (file)
@@ -95,6 +95,8 @@ import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;
 import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;
 import org.forester.archaeopteryx.phylogeny.data.RenderableDomainArchitecture;
 import org.forester.archaeopteryx.phylogeny.data.RenderableVector;
+import org.forester.archaeopteryx.tools.Blast;
+import org.forester.archaeopteryx.tools.ImageLoader;
 import org.forester.io.parsers.phyloxml.PhyloXmlUtil;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.phylogeny.PhylogenyMethods;
@@ -1097,7 +1099,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
      * 
      * @return a pointer to the phylogeny
      */
-    final Phylogeny getPhylogeny() {
+    public final Phylogeny getPhylogeny() {
         return _phylogeny;
     }
 
@@ -4108,7 +4110,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         setPreferredSize( new Dimension( x, y ) );
     }
 
-    final void setArrowCursor() {
+    public final void setArrowCursor() {
         setCursor( ARROW_CURSOR );
         repaint();
     }
@@ -4125,7 +4127,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         getMainPanel().setCutOrCopiedTree( cut_or_copied_tree );
     }
 
-    final void setEdited( final boolean edited ) {
+    public final void setEdited( final boolean edited ) {
         _edited = edited;
     }
 
@@ -4323,7 +4325,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
      * @param t
      *            an instance of a Phylogeny
      */
-    final void setTree( final Phylogeny t ) {
+    public final void setTree( final Phylogeny t ) {
         _nodes_in_preorder = null;
         _phylogeny = t;
     }
@@ -4358,7 +4360,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         _urt_factor_ov = urt_factor_ov;
     }
 
-    final void setWaitCursor() {
+    public final void setWaitCursor() {
         setCursor( WAIT_CURSOR );
         repaint();
     }
@@ -4877,11 +4879,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         }
     }
 
-    synchronized void setImageMap( final Hashtable<String, BufferedImage> image_map ) {
+    public synchronized void setImageMap( final Hashtable<String, BufferedImage> image_map ) {
         getMainPanel().setImageMap( image_map );
     }
 
-    synchronized Hashtable<String, BufferedImage> getImageMap() {
+    public synchronized Hashtable<String, BufferedImage> getImageMap() {
         return getMainPanel().getImageMap();
     }
 }
index 91e36b1..408a3d7 100644 (file)
@@ -70,7 +70,7 @@ import org.forester.phylogeny.iterators.PreorderTreeIterator;
 import org.forester.util.DescriptiveStatistics;
 import org.forester.util.ForesterUtil;
 
-final class Util {
+public final class Util {
 
     private final static String[] AVAILABLE_FONT_FAMILIES_SORTED = GraphicsEnvironment.getLocalGraphicsEnvironment()
                                                                          .getAvailableFontFamilyNames();
@@ -614,7 +614,7 @@ final class Util {
         System.out.println( "[" + applet_name + "] > " + message );
     }
 
-    final static void printWarningMessage( final String name, final String message ) {
+    public final static void printWarningMessage( final String name, final String message ) {
         System.out.println( "[" + name + "] > " + message );
     }
 
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.net.UnknownHostException;
 import java.util.SortedSet;
@@ -31,6 +31,8 @@ import java.util.SortedSet;
 import javax.swing.JOptionPane;
 
 import org.forester.analysis.AncestralTaxonomyInference;
+import org.forester.archaeopteryx.MainFrameApplication;
+import org.forester.archaeopteryx.TreePanel;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.ws.uniprot.UniProtWsTools;
 
@@ -40,7 +42,7 @@ public class AncestralTaxonomyInferrer implements Runnable {
     private final MainFrameApplication _mf;
     private final TreePanel            _treepanel;
 
-    AncestralTaxonomyInferrer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
+    public AncestralTaxonomyInferrer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
         _phy = phy;
         _mf = mf;
         _treepanel = treepanel;
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -38,7 +38,7 @@ public class Blast {
     public Blast() {
     }
 
-    void go( final String geneName ) {
+    public void go( final String geneName ) {
         // Retrieve accession number list which has specified gene name from searchByXMLPath of ARSA. Please click here for details of ARSA.
         /*target: Sequence length is between 300bp and 1000bp.
         Feature key is CDS.
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -33,6 +33,8 @@ import java.net.URL;
 import java.util.Arrays;
 import java.util.List;
 
+import org.forester.archaeopteryx.MainFrameApplication;
+import org.forester.archaeopteryx.TreePanel;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Accession;
@@ -41,7 +43,7 @@ import org.forester.phylogeny.data.Sequence;
 import org.forester.phylogeny.iterators.PhylogenyNodeIterator;
 import org.forester.util.ForesterUtil;
 
-public class MainPanelEdit implements Runnable {
+public class GoAnnotation implements Runnable {
 
     private static final String        SYMBOL   = "Symbol";
     private static final String        ASPECT   = "Aspect";
@@ -53,7 +55,7 @@ public class MainPanelEdit implements Runnable {
     private final MainFrameApplication _mf;
     private final TreePanel            _treepanel;
 
-    MainPanelEdit( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
+    public GoAnnotation( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
         _phy = phy;
         _mf = mf;
         _treepanel = treepanel;
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.awt.image.BufferedImage;
 import java.io.IOException;
@@ -34,6 +34,9 @@ import java.util.List;
 
 import javax.imageio.ImageIO;
 
+import org.forester.archaeopteryx.Constants;
+import org.forester.archaeopteryx.TreePanel;
+import org.forester.archaeopteryx.Util;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Taxonomy;
 import org.forester.phylogeny.data.Uri;
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.awt.Color;
 import java.awt.FlowLayout;
@@ -45,6 +45,8 @@ import javax.swing.JTextField;
 import javax.swing.border.Border;
 import javax.swing.border.LineBorder;
 
+import org.forester.archaeopteryx.MainFrameApplication;
+import org.forester.archaeopteryx.Util;
 import org.forester.evoinference.distance.PairwiseDistanceCalculator.PWD_DISTANCE_METHOD;
 import org.forester.sequence.Sequence;
 import org.forester.util.BasicDescriptiveStatistics;
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.io.File;
 
+import org.forester.archaeopteryx.Configuration;
 import org.forester.evoinference.distance.PairwiseDistanceCalculator.PWD_DISTANCE_METHOD;
 import org.forester.msa.Mafft;
 
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.io.BufferedWriter;
 import java.io.File;
@@ -34,6 +34,7 @@ import java.util.List;
 
 import javax.swing.JOptionPane;
 
+import org.forester.archaeopteryx.MainFrameApplication;
 import org.forester.evoinference.distance.NeighborJoining;
 import org.forester.evoinference.distance.PairwiseDistanceCalculator;
 import org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix;
@@ -24,7 +24,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.io.IOException;
 import java.net.UnknownHostException;
@@ -33,6 +33,8 @@ import java.util.SortedSet;
 import javax.swing.JOptionPane;
 
 import org.forester.analysis.AncestralTaxonomyInference;
+import org.forester.archaeopteryx.MainFrameApplication;
+import org.forester.archaeopteryx.TreePanel;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.ws.uniprot.UniProtWsTools;
 
@@ -42,7 +44,7 @@ public class TaxonomyDataObtainer implements Runnable {
     private final MainFrameApplication _mf;
     private final TreePanel            _treepanel;
 
-    TaxonomyDataObtainer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
+    public TaxonomyDataObtainer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
         _phy = phy;
         _mf = mf;
         _treepanel = treepanel;
@@ -23,7 +23,7 @@
 // Contact: phylosoft @ gmail . com
 // WWW: www.phylosoft.org/forester
 
-package org.forester.archaeopteryx;
+package org.forester.archaeopteryx.tools;
 
 import java.io.IOException;
 import java.net.UnknownHostException;
@@ -33,6 +33,8 @@ import java.util.TreeSet;
 
 import javax.swing.JOptionPane;
 
+import org.forester.archaeopteryx.MainFrameApplication;
+import org.forester.archaeopteryx.TreePanel;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Accession;
@@ -50,7 +52,7 @@ public class UniProtSequenceObtainer implements Runnable {
     private final MainFrameApplication _mf;
     private final TreePanel            _treepanel;
 
-    UniProtSequenceObtainer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
+    public UniProtSequenceObtainer( final MainFrameApplication mf, final TreePanel treepanel, final Phylogeny phy ) {
         _phy = phy;
         _mf = mf;
         _treepanel = treepanel;