domain + go output work begins
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 17 Dec 2014 01:46:25 +0000 (01:46 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 17 Dec 2014 01:46:25 +0000 (01:46 +0000)
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/ControlPanel.java
forester/java/src/org/forester/archaeopteryx/MainFrame.java
forester/java/src/org/forester/archaeopteryx/Options.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/archaeopteryx/TreePanelUtil.java
forester/java/src/org/forester/phylogeny/data/NodeData.java
forester/java/src/org/forester/phylogeny/data/NodeDataField.java [new file with mode: 0644]

index f8f5302..f720a3a 100644 (file)
@@ -47,7 +47,7 @@ import org.forester.archaeopteryx.Options.NODE_LABEL_DIRECTION;
 import org.forester.archaeopteryx.Options.OVERVIEW_PLACEMENT_TYPE;
 import org.forester.archaeopteryx.Options.PHYLOGENY_GRAPHICS_TYPE;
 import org.forester.io.parsers.nhx.NHXParser.TAXONOMY_EXTRACTION;
-import org.forester.phylogeny.data.NodeData.NODE_DATA;
+import org.forester.phylogeny.data.NodeDataField;
 import org.forester.phylogeny.data.NodeVisualData;
 import org.forester.phylogeny.data.NodeVisualData.NodeFill;
 import org.forester.phylogeny.data.NodeVisualData.NodeShape;
@@ -203,7 +203,7 @@ public final class Configuration {
     private SortedMap<String, Color>        _display_colors                                        = null;
     private boolean                         _display_sequence_relations                            = false;
     private boolean                         _editable                                              = true;
-    private NODE_DATA                       _ext_desc_data_to_return                               = NODE_DATA.UNKNOWN;
+    private NodeDataField                       _ext_desc_data_to_return                               = NodeDataField.UNKNOWN;
     private EXT_NODE_DATA_RETURN_ON         _ext_node_data_return_on                               = EXT_NODE_DATA_RETURN_ON.WINODW;
     private int                             _frame_x_size;
     private int                             _frame_y_size;
@@ -514,7 +514,7 @@ public final class Configuration {
         return _domain_colors;
     }
 
-    public NODE_DATA getExtDescNodeDataToReturn() {
+    public NodeDataField getExtDescNodeDataToReturn() {
         return _ext_desc_data_to_return;
     }
 
@@ -1003,7 +1003,7 @@ public final class Configuration {
         _editable = editable;
     }
 
-    public void setExtDescNodeDataToReturn( final NODE_DATA ext_desc_data_to_return ) {
+    public void setExtDescNodeDataToReturn( final NodeDataField ext_desc_data_to_return ) {
         _ext_desc_data_to_return = ext_desc_data_to_return;
     }
 
@@ -1434,49 +1434,43 @@ public final class Configuration {
         else if ( key.equals( "ext_descendents_data_to_return" ) ) {
             final String s = ( ( String ) st.nextElement() ).trim();
             if ( s.equalsIgnoreCase( "node_name" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.NODE_NAME );
+                setExtDescNodeDataToReturn( NodeDataField.NODE_NAME );
             }
             else if ( s.equalsIgnoreCase( "sequence_acc" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_ACC );
+                setExtDescNodeDataToReturn( NodeDataField.SEQUENCE_ACC );
             }
             else if ( s.equalsIgnoreCase( "sequence_mol_seq_fasta" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_MOL_SEQ_FASTA );
-            }
-            else if ( s.equalsIgnoreCase( "sequence_mol_seq" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_MOL_SEQ );
+                setExtDescNodeDataToReturn( NodeDataField.SEQUENCE_MOL_SEQ_FASTA );
             }
             else if ( s.equalsIgnoreCase( "sequence_name" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_NAME );
+                setExtDescNodeDataToReturn( NodeDataField.SEQUENCE_NAME );
             }
             else if ( s.equalsIgnoreCase( "gene_name" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.GENE_NAME );
+                setExtDescNodeDataToReturn( NodeDataField.GENE_NAME );
             }
             else if ( s.equalsIgnoreCase( "sequence_symbol" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.SEQUENCE_SYMBOL );
+                setExtDescNodeDataToReturn( NodeDataField.SEQUENCE_SYMBOL );
             }
             else if ( s.equalsIgnoreCase( "taxonomy_scientific_name" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_SCIENTIFIC_NAME );
+                setExtDescNodeDataToReturn( NodeDataField.TAXONOMY_SCIENTIFIC_NAME );
             }
             else if ( s.equalsIgnoreCase( "taxonomy_code" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_CODE );
-            }
-            else if ( s.equalsIgnoreCase( "taxonomy_common_name" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_COMM0N_NAME );
+                setExtDescNodeDataToReturn( NodeDataField.TAXONOMY_CODE );
             }
             else if ( s.equalsIgnoreCase( "user_selected" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.UNKNOWN );
+                setExtDescNodeDataToReturn( NodeDataField.UNKNOWN );
             }
             else if ( s.equalsIgnoreCase( "domains" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.DOMAINS_ALL );
+                setExtDescNodeDataToReturn( NodeDataField.DOMAINS_ALL );
             }
             else if ( s.equalsIgnoreCase( "domains_collapsed" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.DOMAINS_COLLAPSED_PER_PROTEIN );
+                setExtDescNodeDataToReturn( NodeDataField.DOMAINS_COLLAPSED_PER_PROTEIN );
             }
             else if ( s.equalsIgnoreCase( "seq_annotations" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.SEQ_ANNOTATIONS );
+                setExtDescNodeDataToReturn( NodeDataField.SEQ_ANNOTATIONS );
             }
             else if ( s.equalsIgnoreCase( "go_term_ids" ) ) {
-                setExtDescNodeDataToReturn( NODE_DATA.GO_TERM_IDS );
+                setExtDescNodeDataToReturn( NodeDataField.GO_TERM_IDS );
             }
             else {
                 ForesterUtil.printWarningMessage( Constants.PRG_NAME, "unknown value [" + s
index e51d654..c68b51a 100644 (file)
@@ -1302,10 +1302,7 @@ final class ControlPanel extends JPanel implements ActionListener {
         _sequence_colors = sequence_colors;
     }
 
-    /* GUILHEM_END */
-    /*
-     * Set up the controls from the config settings. 11/26/05
-     */
+   
     void setupControls() {
         // The tree display options:
         setupDisplayCheckboxes();
@@ -2040,57 +2037,7 @@ final class ControlPanel extends JPanel implements ActionListener {
                         .getLabelForGetExtDescendentsData() );
             }
             else {
-                String s = ";";
-                switch ( getConfiguration().getExtDescNodeDataToReturn() ) {
-                    case NODE_NAME:
-                        s = "Node Names";
-                        break;
-                    case SEQUENCE_ACC:
-                        s = "Sequence Accessors";
-                        break;
-                    case SEQUENCE_MOL_SEQ:
-                        s = "Molecular Sequence";
-                        break;
-                    case SEQUENCE_MOL_SEQ_FASTA:
-                        s = "Molecular Sequence (Fasta)";
-                        break;
-                    case SEQUENCE_NAME:
-                        s = "Sequence Names";
-                        break;
-                    case GENE_NAME:
-                        s = "Gene Names";
-                        break;
-                    case SEQUENCE_SYMBOL:
-                        s = "Sequence Symbols";
-                        break;
-                    case TAXONOMY_CODE:
-                        s = "Taxonomy Codes";
-                        break;
-                    case TAXONOMY_COMM0N_NAME:
-                        s = "Taxonomy Common Names";
-                        break;
-                    case TAXONOMY_SCIENTIFIC_NAME:
-                        s = "Scientific Names";
-                        break;
-                    case DOMAINS_ALL:
-                        s = "Domains";
-                        break;
-                    case DOMAINS_COLLAPSED_PER_PROTEIN:
-                        s = "Domains (collapsed per protein)";
-                        break;
-                    case GO_TERM_IDS:
-                        s = "GO Term IDs";
-                        break;
-                    case SEQ_ANNOTATIONS:
-                        s = "Sequence Annotations";
-                        break;
-                    case UNKNOWN:
-                        s = "User/UI Selected Data Fields";
-                        break;
-                    default:
-                        throw new IllegalStateException( "dont know how to deal with "
-                                + getConfiguration().getExtDescNodeDataToReturn() );
-                }
+                final String s = getOptions().getExtDescNodeDataToReturn().toString();
                 final String label = _configuration.getClickToTitle( Configuration.get_ext_desc_data ) + " " + s;
                 addClickToOption( Configuration.get_ext_desc_data, label );
             }
index 81f8251..cdcd940 100644 (file)
@@ -65,7 +65,7 @@ import org.forester.phylogeny.PhylogenyMethods.DESCENDANT_SORT_PRIORITY;
 import org.forester.phylogeny.PhylogenyNode;\r
 import org.forester.phylogeny.PhylogenyNode.NH_CONVERSION_SUPPORT_VALUE_STYLE;\r
 import org.forester.phylogeny.data.Annotation;\r
-import org.forester.phylogeny.data.NodeData;\r
+import org.forester.phylogeny.data.NodeDataField;\r
 import org.forester.phylogeny.data.NodeVisualData.NodeFill;\r
 import org.forester.phylogeny.data.NodeVisualData.NodeShape;\r
 import org.forester.phylogeny.iterators.PhylogenyNodeIterator;\r
@@ -1768,22 +1768,19 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     static void cycleNodeDataReturn( final Options op, final TreePanel tree_panel ) {\r
         switch ( op.getExtDescNodeDataToReturn() ) {\r
             case UNKNOWN:\r
-                op.setExtDescNodeDataToReturn( NodeData.NODE_DATA.DOMAINS_ALL );\r
+                op.setExtDescNodeDataToReturn( NodeDataField.DOMAINS_ALL );\r
                 break;\r
             case DOMAINS_ALL:\r
-                op.setExtDescNodeDataToReturn( NodeData.NODE_DATA.DOMAINS_COLLAPSED_PER_PROTEIN );\r
+                op.setExtDescNodeDataToReturn( NodeDataField.DOMAINS_COLLAPSED_PER_PROTEIN );\r
                 break;\r
             case DOMAINS_COLLAPSED_PER_PROTEIN:\r
-                op.setExtDescNodeDataToReturn( NodeData.NODE_DATA.GO_TERM_IDS );\r
+                op.setExtDescNodeDataToReturn( NodeDataField.GO_TERM_IDS );\r
                 break;\r
             case GO_TERM_IDS:\r
-                op.setExtDescNodeDataToReturn( NodeData.NODE_DATA.SEQUENCE_MOL_SEQ );\r
-                break;\r
-            case SEQUENCE_MOL_SEQ:\r
-                op.setExtDescNodeDataToReturn( NodeData.NODE_DATA.SEQUENCE_MOL_SEQ_FASTA );\r
+                op.setExtDescNodeDataToReturn( NodeDataField.SEQUENCE_MOL_SEQ_FASTA );\r
                 break;\r
             default:\r
-                op.setExtDescNodeDataToReturn( NodeData.NODE_DATA.UNKNOWN );\r
+                op.setExtDescNodeDataToReturn( NodeDataField.UNKNOWN );\r
         }\r
     }\r
 \r
@@ -1832,7 +1829,7 @@ public abstract class MainFrame extends JFrame implements ActionListener {
     static void setCycleDataReturnMenuItem( final JMenuItem mi, final Options options ) {\r
         if ( ( options != null ) && ( options.getExtDescNodeDataToReturn() != null ) ) {\r
             mi.setText( "Cycle Node Return Data... (current: "\r
-                    + options.getExtDescNodeDataToReturn().toString().toLowerCase() + ")" );\r
+                    + options.getExtDescNodeDataToReturn().toString() + ")" );\r
         }\r
         else {\r
             mi.setText( "Cycle Node Return Data..." );\r
index ec72006..89a943e 100644 (file)
@@ -29,8 +29,7 @@ import java.awt.Font;
 
 import org.forester.io.parsers.nhx.NHXParser.TAXONOMY_EXTRACTION;
 import org.forester.phylogeny.PhylogenyNode.NH_CONVERSION_SUPPORT_VALUE_STYLE;
-import org.forester.phylogeny.data.NodeData;
-import org.forester.phylogeny.data.NodeData.NODE_DATA;
+import org.forester.phylogeny.data.NodeDataField;
 import org.forester.phylogeny.data.NodeVisualData;
 import org.forester.phylogeny.data.NodeVisualData.NodeFill;
 import org.forester.phylogeny.data.NodeVisualData.NodeShape;
@@ -55,7 +54,7 @@ final public class Options {
     private NodeVisualData.NodeShape          _default_node_shape;
     private short                             _default_node_shape_size;
     private boolean                           _editable;
-    private NODE_DATA                         _ext_desc_data_to_return;
+    private NodeDataField                         _ext_desc_data_to_return;
     private boolean                           _graphics_export_using_actual_size;
     private boolean                           _graphics_export_visible_only;
     private boolean                           _internal_number_are_confidence_for_nh_parsing;
@@ -93,7 +92,7 @@ final public class Options {
         init();
     }
 
-    public NodeData.NODE_DATA getExtDescNodeDataToReturn() {
+    public NodeDataField getExtDescNodeDataToReturn() {
         return _ext_desc_data_to_return;
     }
 
@@ -121,7 +120,7 @@ final public class Options {
         _color_labels_same_as_parent_branch = color_labels_same_as_parent_branch;
     }
 
-    public void setExtDescNodeDataToReturn( final NODE_DATA ext_desc_data_to_return ) {
+    public void setExtDescNodeDataToReturn( final NodeDataField ext_desc_data_to_return ) {
         _ext_desc_data_to_return = ext_desc_data_to_return;
     }
 
@@ -495,7 +494,7 @@ final public class Options {
         _color_labels_same_as_parent_branch = false;
         _show_confidence_stddev = false;
         _nh_conversion_support_value_style = NH_CONVERSION_SUPPORT_VALUE_STYLE.NONE;
-        _ext_desc_data_to_return = NODE_DATA.UNKNOWN;
+        _ext_desc_data_to_return = NodeDataField.UNKNOWN;
         _line_up_renderable_node_data = true;
         _right_align_domains = false;
     }
index 6f21d82..639b540 100644 (file)
@@ -77,11 +77,8 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
-import java.util.SortedMap;
 import java.util.SortedSet;
-import java.util.TreeMap;
 
 import javax.swing.BorderFactory;
 import javax.swing.JApplet;
@@ -117,7 +114,7 @@ import org.forester.phylogeny.data.BranchColor;
 import org.forester.phylogeny.data.Confidence;
 import org.forester.phylogeny.data.DomainArchitecture;
 import org.forester.phylogeny.data.Event;
-import org.forester.phylogeny.data.NodeData.NODE_DATA;
+import org.forester.phylogeny.data.NodeDataField;
 import org.forester.phylogeny.data.NodeVisualData;
 import org.forester.phylogeny.data.NodeVisualData.NodeFill;
 import org.forester.phylogeny.data.NodeVisualData.NodeShape;
@@ -309,7 +306,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         calculateScaleDistance();
         FORMATTER_CONFIDENCE.setMaximumFractionDigits( configuration.getNumberOfDigitsAfterCommaForConfidenceValues() );
         FORMATTER_BRANCH_LENGTH.setMaximumFractionDigits( configuration
-                                                          .getNumberOfDigitsAfterCommaForBranchLengthValues() );
+                .getNumberOfDigitsAfterCommaForBranchLengthValues() );
     }
 
     @Override
@@ -597,7 +594,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             return;
         }
         int max_length = ForesterUtil.roundToInt( ( getSize().getWidth() - MOVE )
-                                                  * Constants.EXT_NODE_INFO_LENGTH_MAX_RATIO );
+                * Constants.EXT_NODE_INFO_LENGTH_MAX_RATIO );
         if ( max_length < 40 ) {
             max_length = 40;
         }
@@ -633,7 +630,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             }
             if ( getControlPanel().isShowBinaryCharacters() && node.getNodeData().isHasBinaryCharacters() ) {
                 sum += getFontMetricsForLargeDefaultFont().stringWidth( node.getNodeData().getBinaryCharacters()
-                                                                        .getGainedCharactersAsStringBuffer().toString() );
+                        .getGainedCharactersAsStringBuffer().toString() );
             }
             if ( getControlPanel().isShowVectorData() && ( node.getNodeData().getVector() != null )
                     && ( node.getNodeData().getVector().size() > 0 ) ) {
@@ -790,7 +787,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         }
                         catch ( final NumberFormatException e ) {
                             JOptionPane.showMessageDialog( this, "Could not parse \"" + value_str
-                                                           + "\" into a decimal value", "Problem with Vector Data", JOptionPane.ERROR_MESSAGE );
+                                    + "\" into a decimal value", "Problem with Vector Data", JOptionPane.ERROR_MESSAGE );
                             return;
                         }
                         int i = -1;
@@ -800,7 +797,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         catch ( final NumberFormatException e ) {
                             JOptionPane.showMessageDialog( this,
                                                            "Could not parse \"" + index_str
-                                                           + "\" into index for vector data",
+                                                                   + "\" into index for vector data",
                                                            "Problem with Vector Data",
                                                            JOptionPane.ERROR_MESSAGE );
                             return;
@@ -1097,11 +1094,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 if ( !( node.getNodeData().getSequence().getDomainArchitecture() instanceof RenderableDomainArchitecture ) ) {
                     if ( SPECIAL_DOMAIN_COLORING ) {
                         rds = new RenderableDomainArchitecture( node.getNodeData().getSequence()
-                                                                .getDomainArchitecture(), node.getName() );
+                                .getDomainArchitecture(), node.getName() );
                     }
                     else {
                         rds = new RenderableDomainArchitecture( node.getNodeData().getSequence()
-                                                                .getDomainArchitecture() );
+                                .getDomainArchitecture() );
                     }
                     node.getNodeData().getSequence().setDomainArchitecture( rds );
                 }
@@ -1134,14 +1131,14 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         return ( ( e.getX() > ( getVisibleRect().x + getOvXPosition() + 1 ) )
                 && ( e.getX() < ( ( getVisibleRect().x + getOvXPosition() + getOvMaxWidth() ) - 1 ) )
                 && ( e.getY() > ( getVisibleRect().y + getOvYPosition() + 1 ) ) && ( e.getY() < ( ( getVisibleRect().y
-                        + getOvYPosition() + getOvMaxHeight() ) - 1 ) ) );
+                + getOvYPosition() + getOvMaxHeight() ) - 1 ) ) );
     }
 
     final boolean inOvRectangle( final MouseEvent e ) {
         return ( ( e.getX() >= ( getOvRectangle().getX() - 1 ) )
                 && ( e.getX() <= ( getOvRectangle().getX() + getOvRectangle().getWidth() + 1 ) )
                 && ( e.getY() >= ( getOvRectangle().getY() - 1 ) ) && ( e.getY() <= ( getOvRectangle().getY()
-                        + getOvRectangle().getHeight() + 1 ) ) );
+                + getOvRectangle().getHeight() + 1 ) ) );
     }
 
     final boolean isApplet() {
@@ -1246,7 +1243,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 y = max_y;
             }
             getMainPanel().getCurrentScrollPane().getViewport()
-            .setViewPosition( new Point( ForesterUtil.roundToInt( x ), ForesterUtil.roundToInt( y ) ) );
+                    .setViewPosition( new Point( ForesterUtil.roundToInt( x ), ForesterUtil.roundToInt( y ) ) );
             setInOvRect( true );
             repaint();
         }
@@ -1494,7 +1491,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         if ( isInFoundNodes( c ) || isInCurrentExternalNodes( c ) ) {
             g.setColor( getColorForFoundNode( c ) );
             drawRectFilled( c.getXSecondary() - OVERVIEW_FOUND_NODE_BOX_SIZE_HALF, c.getYSecondary()
-                            - OVERVIEW_FOUND_NODE_BOX_SIZE_HALF, OVERVIEW_FOUND_NODE_BOX_SIZE, OVERVIEW_FOUND_NODE_BOX_SIZE, g );
+                    - OVERVIEW_FOUND_NODE_BOX_SIZE_HALF, OVERVIEW_FOUND_NODE_BOX_SIZE, OVERVIEW_FOUND_NODE_BOX_SIZE, g );
         }
     }
 
@@ -1584,7 +1581,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             else {
                 if ( !to_graphics_file ) {
                     g.setPaint( new GradientPaint( r.x, r.y, getTreeColorSet().getBackgroundColor(), r.x, r.y
-                                                   + r.height, getTreeColorSet().getBackgroundColorGradientBottom() ) );
+                            + r.height, getTreeColorSet().getBackgroundColorGradientBottom() ) );
                     g.fill( r );
                 }
                 else {
@@ -1618,7 +1615,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             }
             // Position starting Y of tree
             _phylogeny.getRoot().setYcoord( ( getYdistance() * _phylogeny.getRoot().getNumberOfExternalNodes() )
-                                            + ( TreePanel.MOVE / 2.0f ) );
+                    + ( TreePanel.MOVE / 2.0f ) );
             final int dynamic_hiding_factor = calcDynamicHidingFactor();
             if ( getControlPanel().isDynamicallyHideData() ) {
                 if ( dynamic_hiding_factor > 1 ) {
@@ -1754,7 +1751,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                                    y_pos + radius_ov,
                                    ( int ) ( radius_ov - ( getLongestExtNodeInfo() / ( getVisibleRect().width / getOvRectangle()
                                            .getWidth() ) ) ),
-                                           g );
+                                   g );
                 g.setTransform( _at );
                 paintOvRectangle( g );
             }
@@ -1836,20 +1833,20 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             x = TreePanel.MOVE
                     + getLongestExtNodeInfo()
                     + ForesterUtil
-                    .roundToInt( ( getXcorrectionFactor() * getPhylogeny().getHeight() ) + getXdistance() );
+                            .roundToInt( ( getXcorrectionFactor() * getPhylogeny().getHeight() ) + getXdistance() );
         }
         else {
             if ( !isNonLinedUpCladogram() && !isUniformBranchLengthsForCladogram() ) {
                 x = TreePanel.MOVE
                         + getLongestExtNodeInfo()
                         + ForesterUtil.roundToInt( getXdistance()
-                                                   * ( getPhylogeny().getRoot().getNumberOfExternalNodes() + 2 ) );
+                                * ( getPhylogeny().getRoot().getNumberOfExternalNodes() + 2 ) );
             }
             else {
                 x = TreePanel.MOVE
                         + getLongestExtNodeInfo()
                         + ForesterUtil.roundToInt( getXdistance()
-                                                   * ( PhylogenyMethods.calculateMaxDepth( getPhylogeny() ) + 1 ) );
+                                * ( PhylogenyMethods.calculateMaxDepth( getPhylogeny() ) + 1 ) );
             }
         }
         setPreferredSize( new Dimension( x, y ) );
@@ -3110,7 +3107,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         return ( ( x >= ( getOvVirtualRectangle().x - 1 ) )
                 && ( x <= ( getOvVirtualRectangle().x + getOvVirtualRectangle().width + 1 ) )
                 && ( y >= ( getOvVirtualRectangle().y - 1 ) ) && ( y <= ( getOvVirtualRectangle().y
-                        + getOvVirtualRectangle().height + 1 ) ) );
+                + getOvVirtualRectangle().height + 1 ) ) );
     }
 
     final private boolean inOvVirtualRectangle( final MouseEvent e ) {
@@ -3137,8 +3134,8 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 && ( ( !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getScientificName() ) )
                         || ( !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getTaxonomyCode() ) )
                         || ( !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getCommonName() ) ) || ( ( node
-                                .getNodeData().getTaxonomy().getIdentifier() != null ) && !ForesterUtil.isEmpty( node
-                                                                                                                 .getNodeData().getTaxonomy().getIdentifier().getValue() ) ) ) ) {
+                        .getNodeData().getTaxonomy().getIdentifier() != null ) && !ForesterUtil.isEmpty( node
+                        .getNodeData().getTaxonomy().getIdentifier().getValue() ) ) ) ) {
             return true;
         }
         else {
@@ -3173,14 +3170,14 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         }
         return ( ( node.getYcoord() < ( getVisibleRect().getMinY() - y_dist ) )
                 || ( node.getYcoord() > ( getVisibleRect().getMaxY() + y_dist ) ) || ( ( node.getParent() != null ) && ( node
-                        .getParent().getXcoord() > getVisibleRect().getMaxX() ) ) );
+                .getParent().getXcoord() > getVisibleRect().getMaxX() ) ) );
     }
 
     final private boolean isNodeDataInvisibleUnrootedCirc( final PhylogenyNode node ) {
         return ( ( node.getYcoord() < ( getVisibleRect().getMinY() - 20 ) )
                 || ( node.getYcoord() > ( getVisibleRect().getMaxY() + 20 ) )
                 || ( node.getXcoord() < ( getVisibleRect().getMinX() - 20 ) ) || ( node.getXcoord() > ( getVisibleRect()
-                        .getMaxX() + 20 ) ) );
+                .getMaxX() + 20 ) ) );
     }
 
     final private boolean isNonLinedUpCladogram() {
@@ -3364,6 +3361,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         _node_popup_menu_items = new JMenuItem[ clickto_names.size() ];
         for( int i = 0; i < clickto_names.size(); i++ ) {
             final String title = clickto_names.get( i );
+           
             _node_popup_menu_items[ i ] = new JMenuItem( title );
             if ( title.equals( Configuration.clickto_options[ Configuration.open_seq_web ][ 0 ] ) ) {
                 final String id = isCanOpenSeqWeb( node );
@@ -3410,6 +3408,13 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 }
                 //
             }
+            else if ( title.equals( Configuration.clickto_options[ Configuration.get_ext_desc_data ][ 0 ] ) ) {
+                System.out.println( ">>>>>>>>>>>>>>>>>>" + title );//TODO
+                _node_popup_menu_items[ i ].setText( "horsehit" );
+                //TODO
+            }
+            
+            
             else if ( title.equals( Configuration.clickto_options[ Configuration.open_tax_web ][ 0 ] ) ) {
                 _node_popup_menu_items[ i ].setEnabled( isCanOpenTaxWeb( node ) );
             }
@@ -3578,41 +3583,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
     }
 
     private final String obtainTitleForExtDescNodeData() {
-        switch ( getOptions().getExtDescNodeDataToReturn() ) {
-            case NODE_NAME:
-                return "Node Names";
-            case GENE_NAME:
-                return "Gene Names";
-            case SEQUENCE_NAME:
-                return "Sequence Names";
-            case SEQUENCE_SYMBOL:
-                return "Sequence Symbols";
-            case SEQUENCE_MOL_SEQ:
-                return "Molecular Sequences";
-            case SEQUENCE_MOL_SEQ_FASTA:
-                return "Molecular Sequences (Fasta)";
-            case SEQUENCE_ACC:
-                return "Sequence Accessors";
-            case TAXONOMY_SCIENTIFIC_NAME:
-                return "Scientific Names";
-            case TAXONOMY_CODE:
-                return "Taxonomy Codes";
-            case TAXONOMY_COMM0N_NAME:
-                return "Taxonomy Common Names";
-            case DOMAINS_ALL:
-                return "Domains [E-value threshold: " + Math.pow( 10, getDomainStructureEvalueThresholdExp() ) + "]";
-            case DOMAINS_COLLAPSED_PER_PROTEIN:
-                return "Domains [collapsed per protein, E-value threshold: " + Math.pow( 10, getDomainStructureEvalueThresholdExp() ) + "]";
-            case SEQ_ANNOTATIONS:
-                return "Sequence Annotations";
-            case GO_TERM_IDS:
-                return "GO Term IDs";    
-            case UNKNOWN:
-                return "User/UI Selected Data Fields";
-            default:
-                throw new IllegalArgumentException( "unknown data element: "
-                        + getOptions().getExtDescNodeDataToReturn() );
-        }
+        return getOptions().getExtDescNodeDataToReturn().toString();
     }
 
     final private void openPdbWeb( final PhylogenyNode node ) {
@@ -3628,7 +3599,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                     AptxUtil.launchWebBrowser( new URI( uri_str ),
                                                isApplet(),
                                                isApplet() ? obtainApplet() : null,
-                            "_aptx_seq" );
+                                               "_aptx_seq" );
                 }
                 catch ( final IOException e ) {
                     AptxUtil.showErrorMessage( this, e.toString() );
@@ -3656,7 +3627,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 AptxUtil.launchWebBrowser( new URI( uri_str ),
                                            isApplet(),
                                            isApplet() ? obtainApplet() : null,
-                        "_aptx_seq" );
+                                           "_aptx_seq" );
             }
             catch ( final IOException e ) {
                 AptxUtil.showErrorMessage( this, e.toString() );
@@ -3739,7 +3710,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 AptxUtil.launchWebBrowser( new URI( uri_str ),
                                            isApplet(),
                                            isApplet() ? obtainApplet() : null,
-                        "_aptx_tax" );
+                                           "_aptx_tax" );
             }
             catch ( final IOException e ) {
                 AptxUtil.showErrorMessage( this, e.toString() );
@@ -3769,20 +3740,20 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         if ( !node.isRoot() ) {
             if ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) {
                 TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), node.getParent()
-                                      .getXcoord() + EURO_D, node.getYcoord() - getTreeFontSet().getSmallMaxDescent(), g );
+                        .getXcoord() + EURO_D, node.getYcoord() - getTreeFontSet().getSmallMaxDescent(), g );
             }
             else if ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.ROUNDED ) {
                 TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), node.getParent()
-                                      .getXcoord() + ROUNDED_D, node.getYcoord() - getTreeFontSet().getSmallMaxDescent(), g );
+                        .getXcoord() + ROUNDED_D, node.getYcoord() - getTreeFontSet().getSmallMaxDescent(), g );
             }
             else {
                 TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), node.getParent()
-                                      .getXcoord() + 3, node.getYcoord() - getTreeFontSet().getSmallMaxDescent(), g );
+                        .getXcoord() + 3, node.getYcoord() - getTreeFontSet().getSmallMaxDescent(), g );
             }
         }
         else {
             TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), 3, node.getYcoord()
-                                  - getTreeFontSet().getSmallMaxDescent(), g );
+                    - getTreeFontSet().getSmallMaxDescent(), g );
         }
     }
 
@@ -3804,7 +3775,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             final float dx = x2 - x1;
             final float dy = y2 - y1;
             _cubic_curve.setCurve( x1, y1, x1 + ( dx * 0.4f ), y1 + ( dy * 0.2f ), x1 + ( dx * 0.6f ), y1
-                                   + ( dy * 0.8f ), x2, y2 );
+                    + ( dy * 0.8f ), x2, y2 );
             ( g ).draw( _cubic_curve );
         }
         else {
@@ -3843,7 +3814,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             final float dx = x2 - x1;
             final float dy = y2 - y1;
             _cubic_curve.setCurve( x1, y1, x1 + ( dx * 0.4f ), y1 + ( dy * 0.2f ), x1 + ( dx * 0.6f ), y1
-                                   + ( dy * 0.8f ), x2, y2 );
+                    + ( dy * 0.8f ), x2, y2 );
             g.draw( _cubic_curve );
         }
         else {
@@ -4106,13 +4077,13 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         not_first = true;
                     }
                     sb.append( FORMATTER_CONFIDENCE.format( ForesterUtil.round( value, getOptions()
-                                                                                .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
+                            .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
                     if ( getOptions().isShowConfidenceStddev() ) {
                         if ( confidence.getStandardDeviation() != Confidence.CONFIDENCE_DEFAULT_VALUE ) {
                             sb.append( "(" );
                             sb.append( FORMATTER_CONFIDENCE.format( ForesterUtil.round( confidence
-                                                                                        .getStandardDeviation(), getOptions()
-                                                                                        .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
+                                    .getStandardDeviation(), getOptions()
+                                    .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
                             sb.append( ")" );
                         }
                     }
@@ -4138,10 +4109,10 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             final String conf_str = sb.toString();
             TreePanel.drawString( conf_str,
                                   parent_x
-                                  + ( ( x - parent_x - getTreeFontSet().getFontMetricsSmall()
-                                          .stringWidth( conf_str ) ) / 2 ),
-                                          ( node.getYcoord() + getTreeFontSet().getSmallMaxAscent() ) - 1,
-                                          g );
+                                          + ( ( x - parent_x - getTreeFontSet().getFontMetricsSmall()
+                                                  .stringWidth( conf_str ) ) / 2 ),
+                                  ( node.getYcoord() + getTreeFontSet().getSmallMaxAscent() ) - 1,
+                                  g );
         }
     }
 
@@ -4158,18 +4129,18 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 g.setColor( Color.BLUE );
             }
             TreePanel
-            .drawString( gained,
-                         parent_x
-                         + ( ( x - parent_x - getFontMetricsForLargeDefaultFont().stringWidth( gained ) ) / 2 ),
-                         ( node.getYcoord() - getFontMetricsForLargeDefaultFont().getMaxDescent() ),
-                         g );
+                    .drawString( gained,
+                                 parent_x
+                                         + ( ( x - parent_x - getFontMetricsForLargeDefaultFont().stringWidth( gained ) ) / 2 ),
+                                 ( node.getYcoord() - getFontMetricsForLargeDefaultFont().getMaxDescent() ),
+                                 g );
             g.setColor( getTreeColorSet().getLostCharactersColor() );
             TreePanel
-            .drawString( lost,
-                         parent_x
-                         + ( ( x - parent_x - getFontMetricsForLargeDefaultFont().stringWidth( lost ) ) / 2 ),
-                         ( node.getYcoord() + getFontMetricsForLargeDefaultFont().getMaxAscent() ),
-                         g );
+                    .drawString( lost,
+                                 parent_x
+                                         + ( ( x - parent_x - getFontMetricsForLargeDefaultFont().stringWidth( lost ) ) / 2 ),
+                                 ( node.getYcoord() + getFontMetricsForLargeDefaultFont().getMaxAscent() ),
+                                 g );
         }
     }
 
@@ -4202,16 +4173,16 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 || ( getOptions().isShowDefaultNodeShapesInternal() && node.isInternal() )
                 || ( getOptions().isShowDefaultNodeShapesForMarkedNodes()
                         && ( node.getNodeData().getNodeVisualData() != null ) && ( !node.getNodeData()
-                                .getNodeVisualData().isEmpty() ) )
-                                || ( getControlPanel().isUseVisualStyles() && ( ( node.getNodeData().getNodeVisualData() != null ) && ( ( node
-                                        .getNodeData().getNodeVisualData().getNodeColor() != null )
-                                        || ( node.getNodeData().getNodeVisualData().getSize() != NodeVisualData.DEFAULT_SIZE )
-                                        || ( node.getNodeData().getNodeVisualData().getFillType() != NodeFill.DEFAULT ) || ( node
-                                                .getNodeData().getNodeVisualData().getShape() != NodeShape.DEFAULT ) ) ) )
-                                                || ( getControlPanel().isEvents() && node.isHasAssignedEvent() && ( node.getNodeData().getEvent()
-                                                        .isDuplication()
-                                                        || node.getNodeData().getEvent().isSpeciation() || node.getNodeData().getEvent()
-                                                        .isSpeciationOrDuplication() ) ) ) {
+                        .getNodeVisualData().isEmpty() ) )
+                || ( getControlPanel().isUseVisualStyles() && ( ( node.getNodeData().getNodeVisualData() != null ) && ( ( node
+                        .getNodeData().getNodeVisualData().getNodeColor() != null )
+                        || ( node.getNodeData().getNodeVisualData().getSize() != NodeVisualData.DEFAULT_SIZE )
+                        || ( node.getNodeData().getNodeVisualData().getFillType() != NodeFill.DEFAULT ) || ( node
+                        .getNodeData().getNodeVisualData().getShape() != NodeShape.DEFAULT ) ) ) )
+                || ( getControlPanel().isEvents() && node.isHasAssignedEvent() && ( node.getNodeData().getEvent()
+                        .isDuplication()
+                        || node.getNodeData().getEvent().isSpeciation() || node.getNodeData().getEvent()
+                        .isSpeciationOrDuplication() ) ) ) {
             NodeVisualData vis = null;
             if ( getControlPanel().isUseVisualStyles() && ( node.getNodeData().getNodeVisualData() != null )
                     && ( !node.getNodeData().getNodeVisualData().isEmpty() ) ) {
@@ -4371,7 +4342,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         if ( getControlPanel().isWriteBranchLengthValues()
                 && ( ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR )
                         || ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.ROUNDED ) || ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) )
-                        && ( !node.isRoot() ) && ( node.getDistanceToParent() != PhylogenyDataUtil.BRANCH_LENGTH_DEFAULT ) ) {
+                && ( !node.isRoot() ) && ( node.getDistanceToParent() != PhylogenyDataUtil.BRANCH_LENGTH_DEFAULT ) ) {
             paintBranchLength( g, node, to_pdf, to_graphics_file );
         }
         if ( !getControlPanel().isShowInternalData() && !node.isExternal() && !node.isCollapse() ) {
@@ -4439,12 +4410,12 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                     final boolean fGotRelationWithQuery = ( seqRelation.getRef0().isEqual( _query_sequence ) || seqRelation
                             .getRef1().isEqual( _query_sequence ) )
                             && seqRelation.getType().equals( getControlPanel().getSequenceRelationTypeBox()
-                                                             .getSelectedItem() );
+                                    .getSelectedItem() );
                     if ( fGotRelationWithQuery ) { // we will underline the text to show that this sequence is ortholog to the query
                         final double linePosX = node.getXcoord() + 2 + half_box_size;
                         final String sConfidence = ( !getControlPanel().isShowSequenceRelationConfidence() || ( seqRelation
                                 .getConfidence() == null ) ) ? null : " (" + seqRelation.getConfidence().getValue()
-                                        + ")";
+                                + ")";
                         if ( sConfidence != null ) {
                             float confidenceX = pos_x;
                             if ( sb_str.length() > 0 ) {
@@ -4453,7 +4424,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                             }
                             if ( confidenceX > linePosX ) { // let's only display confidence value if we are already displaying at least one of Prot/Gene Name and Taxonomy Code
                                 final int confidenceWidth = ( int ) new TextLayout( sConfidence, g.getFont(), _frc )
-                                .getBounds().getWidth();
+                                        .getBounds().getWidth();
                                 TreePanel.drawString( sConfidence, confidenceX, pos_y, g );
                                 x += CONFIDENCE_LEFT_MARGIN + confidenceWidth;
                             }
@@ -4467,7 +4438,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                                 nodeTextBoundsWidth += 2;
                             }
                             g.drawLine( ( int ) linePosX + 1, 3 + ( int ) pos_y, ( int ) linePosX + x
-                                        + nodeTextBoundsWidth, 3 + ( int ) pos_y );
+                                    + nodeTextBoundsWidth, 3 + ( int ) pos_y );
                             break;
                         }
                     }
@@ -4498,7 +4469,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             }
             final String ann_str = TreePanelUtil.createAnnotationString( ann, getOptions().isShowAnnotationRefSource() );
             TreePanel.drawString( ann_str, node.getXcoord() + x + 3 + half_box_size, node.getYcoord()
-                                  + ( getFontMetricsForLargeDefaultFont().getAscent() / down_shift_factor ), g );
+                    + ( getFontMetricsForLargeDefaultFont().getAscent() / down_shift_factor ), g );
             _sb.setLength( 0 );
             _sb.append( ann_str );
             if ( _sb.length() > 0 ) {
@@ -4523,22 +4494,22 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 }
                 if ( getControlPanel().isShowBinaryCharacters() ) {
                     TreePanel.drawString( node.getNodeData().getBinaryCharacters().getPresentCharactersAsStringBuffer()
-                                          .toString(), node.getXcoord() + x + 1 + half_box_size, node.getYcoord()
-                                          + ( getFontMetricsForLargeDefaultFont().getAscent() / down_shift_factor ), g );
+                            .toString(), node.getXcoord() + x + 1 + half_box_size, node.getYcoord()
+                            + ( getFontMetricsForLargeDefaultFont().getAscent() / down_shift_factor ), g );
                     paintGainedAndLostCharacters( g, node, node.getNodeData().getBinaryCharacters()
-                                                  .getGainedCharactersAsStringBuffer().toString(), node.getNodeData().getBinaryCharacters()
-                                                  .getLostCharactersAsStringBuffer().toString() );
+                            .getGainedCharactersAsStringBuffer().toString(), node.getNodeData().getBinaryCharacters()
+                            .getLostCharactersAsStringBuffer().toString() );
                 }
                 else {
                     TreePanel
-                    .drawString( " " + node.getNodeData().getBinaryCharacters().getPresentCount(),
-                                 node.getXcoord() + x + 4 + half_box_size,
-                                 node.getYcoord()
-                                 + ( getFontMetricsForLargeDefaultFont().getAscent() / down_shift_factor ),
-                                 g );
+                            .drawString( " " + node.getNodeData().getBinaryCharacters().getPresentCount(),
+                                         node.getXcoord() + x + 4 + half_box_size,
+                                         node.getYcoord()
+                                                 + ( getFontMetricsForLargeDefaultFont().getAscent() / down_shift_factor ),
+                                         g );
                     paintGainedAndLostCharacters( g, node, "+"
                             + node.getNodeData().getBinaryCharacters().getGainedCount(), "-"
-                                    + node.getNodeData().getBinaryCharacters().getLostCount() );
+                            + node.getNodeData().getBinaryCharacters().getLostCount() );
                 }
             }
         }
@@ -4695,7 +4666,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         if ( isInFoundNodes( node ) || isInCurrentExternalNodes( node ) ) {
             g.setColor( getColorForFoundNode( node ) );
             drawRectFilled( node.getXSecondary() - OVERVIEW_FOUND_NODE_BOX_SIZE_HALF, node.getYSecondary()
-                            - OVERVIEW_FOUND_NODE_BOX_SIZE_HALF, OVERVIEW_FOUND_NODE_BOX_SIZE, OVERVIEW_FOUND_NODE_BOX_SIZE, g );
+                    - OVERVIEW_FOUND_NODE_BOX_SIZE_HALF, OVERVIEW_FOUND_NODE_BOX_SIZE, OVERVIEW_FOUND_NODE_BOX_SIZE, g );
         }
         float new_x = 0;
         if ( !node.isExternal() && !node.isCollapse() ) {
@@ -4757,7 +4728,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 && !node.isRoot()
                 && ( ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.ROUNDED )
                         || ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) || ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) )
-                        && node.getBranchData().isHasConfidences() ) {
+                && node.getBranchData().isHasConfidences() ) {
             paintConfidenceValues( g, node, to_pdf, to_graphics_file );
         }
         // Draw a line to root:
@@ -4827,7 +4798,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 && !is_in_found_nodes
                 && ( ( node.isExternal() && ( ( _external_node_index % dynamic_hiding_factor ) != 1 ) ) || ( !node
                         .isExternal() && ( ( new_x_min < 20 ) || ( ( _y_distance * node.getNumberOfExternalNodes() ) < getFontMetricsForLargeDefaultFont()
-                                .getHeight() ) ) ) ) ) {
+                        .getHeight() ) ) ) ) ) {
             return;
         }
         final int x = paintNodeData( g, node, to_graphics_file, to_pdf, is_in_found_nodes );
@@ -4868,7 +4839,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         if ( getOptions().isRightLineUpDomains() ) {
                             rds.render( ( float ) ( ( getMaxDistanceToRoot() * getXcorrectionFactor() )
                                     + _length_of_longest_text + ( ( _longest_domain - rds.getTotalLength() ) * rds
-                                            .getRenderingFactorWidth() ) ), node.getYcoord() - ( h / 2.0f ), g, this, to_pdf );
+                                    .getRenderingFactorWidth() ) ), node.getYcoord() - ( h / 2.0f ), g, this, to_pdf );
                         }
                         else {
                             rds.render( ( float ) ( ( getMaxDistanceToRoot() * getXcorrectionFactor() ) + _length_of_longest_text ),
@@ -4885,12 +4856,12 @@ 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() ),
-                                            node.getYcoord() - ( h / 2.0f ),
-                                            g,
-                                            this,
-                                            to_pdf );
+                                            + ( ( _longest_domain - rds.getTotalLength() ) * rds
+                                                    .getRenderingFactorWidth() ),
+                                    node.getYcoord() - ( h / 2.0f ),
+                                    g,
+                                    this,
+                                    to_pdf );
                     }
                     else {
                         rds.render( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text,
@@ -4929,7 +4900,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 && ( node.getNodeData().getSequence().isMolecularSequenceAligned() )
                 && ( !ForesterUtil.isEmpty( node.getNodeData().getSequence().getMolecularSequence() ) ) ) {
             final RenderableMsaSequence rs = RenderableMsaSequence.createInstance( node.getNodeData().getSequence()
-                                                                                   .getMolecularSequence(), node.getNodeData().getSequence().getType(), getConfiguration() );
+                    .getMolecularSequence(), node.getNodeData().getSequence().getType(), getConfiguration() );
             if ( rs != null ) {
                 final int default_height = 7;
                 float y = getYdistance();
@@ -5004,9 +4975,9 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
 
     final private void paintPhylogenyLite( final Graphics2D g ) {
         _phylogeny
-        .getRoot()
-        .setXSecondary( ( float ) ( getVisibleRect().x + getOvXPosition() + ( MOVE / ( getVisibleRect().width / getOvRectangle()
-                .getWidth() ) ) ) );
+                .getRoot()
+                .setXSecondary( ( float ) ( getVisibleRect().x + getOvXPosition() + ( MOVE / ( getVisibleRect().width / getOvRectangle()
+                        .getWidth() ) ) ) );
         _phylogeny.getRoot().setYSecondary( ( getVisibleRect().y + getOvYStart() ) );
         final Stroke s = g.getStroke();
         g.setStroke( STROKE_05 );
@@ -5106,7 +5077,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             final Rectangle2D nodeTextBounds = new TextLayout( label, g.getFont(), new FontRenderContext( null,
                                                                                                           false,
                                                                                                           false ) )
-            .getBounds();
+                    .getBounds();
             g.fillRect( ( int ) start_x - 1, ( int ) start_y - 8, ( int ) nodeTextBounds.getWidth() + 4, 11 );
             g.setColor( getTreeColorSet().getBackgroundColor() );
         }
@@ -5536,12 +5507,6 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         data.add( n.getNodeData().getSequence().getSymbol() );
                     }
                     break;
-                case SEQUENCE_MOL_SEQ:
-                    if ( n.getNodeData().isHasSequence()
-                            && !ForesterUtil.isEmpty( n.getNodeData().getSequence().getMolecularSequence() ) ) {
-                        data.add( n.getNodeData().getSequence().getMolecularSequence() );
-                    }
-                    break;
                 case SEQUENCE_MOL_SEQ_FASTA:
                     final StringBuilder sb = new StringBuilder();
                     if ( n.getNodeData().isHasSequence()
@@ -5591,7 +5556,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                             ann_str = ann.toString();
                         }
                         sb.append( SequenceWriter.toFasta( ann_str, n.getNodeData().getSequence()
-                                                           .getMolecularSequence(), 60 ) );
+                                .getMolecularSequence(), 60 ) );
                         data.add( sb.toString() );
                     }
                     break;
@@ -5607,22 +5572,16 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         data.add( n.getNodeData().getTaxonomy().getScientificName() );
                     }
                     break;
-                case TAXONOMY_COMM0N_NAME:
-                    if ( n.getNodeData().isHasTaxonomy()
-                            && !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getCommonName() ) ) {
-                        data.add( n.getNodeData().getTaxonomy().getCommonName() );
-                    }
-                    break;
                 case TAXONOMY_CODE:
                     if ( n.getNodeData().isHasTaxonomy()
                             && !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) {
                         data.add( n.getNodeData().getTaxonomy().getTaxonomyCode() );
                     }
                     break;
-                case DOMAINS_ALL:    
+                case DOMAINS_ALL:
                 case DOMAINS_COLLAPSED_PER_PROTEIN:
                     if ( n.getNodeData().isHasSequence()
-                            && n.getNodeData().getSequence().getDomainArchitecture() != null ) {
+                            && ( n.getNodeData().getSequence().getDomainArchitecture() != null ) ) {
                         final DomainArchitecture da = n.getNodeData().getSequence().getDomainArchitecture();
                         final Set<String> s = new HashSet<String>();
                         for( int i = 0; i < da.getDomains().size(); ++i ) {
@@ -5631,32 +5590,32 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                                 final String name = d.getName();
                                 if ( !( s.contains( name ) ) ) {
                                     data.add( name );
-                                    if ( getOptions().getExtDescNodeDataToReturn() == NODE_DATA.DOMAINS_COLLAPSED_PER_PROTEIN ) {
+                                    if ( getOptions().getExtDescNodeDataToReturn() == NodeDataField.DOMAINS_COLLAPSED_PER_PROTEIN ) {
                                         s.add( name );
                                     }
                                 }
                             }
                         }
                     }
-                    break;    
+                    break;
                 case SEQ_ANNOTATIONS:
                     if ( n.getNodeData().isHasSequence() ) {
                         if ( n.getNodeData().isHasSequence()
-                                && n.getNodeData().getSequence().getAnnotations() != null ) {
+                                && ( n.getNodeData().getSequence().getAnnotations() != null ) ) {
                             final SortedSet<Annotation> a = n.getNodeData().getSequence().getAnnotations();
                             for( int i = 0; i < a.size(); ++i ) {
-                                data.add(  n.getNodeData().getSequence().getAnnotation( i ).toString() );
+                                data.add( n.getNodeData().getSequence().getAnnotation( i ).toString() );
                             }
                         }
                     }
-                    break;  
+                    break;
                 case GO_TERM_IDS:
                     if ( n.getNodeData().isHasSequence() ) {
                         if ( n.getNodeData().isHasSequence()
-                                && n.getNodeData().getSequence().getAnnotations() != null ) {
+                                && ( n.getNodeData().getSequence().getAnnotations() != null ) ) {
                             final SortedSet<Annotation> a = n.getNodeData().getSequence().getAnnotations();
                             for( int i = 0; i < a.size(); ++i ) {
-                                final Annotation ann =  n.getNodeData().getSequence().getAnnotation( i );
+                                final Annotation ann = n.getNodeData().getSequence().getAnnotation( i );
                                 final String ref = ann.getRef();
                                 if ( ref.toUpperCase().startsWith( "GO:" ) ) {
                                     data.add( ref );
@@ -5664,7 +5623,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                             }
                         }
                     }
-                    break;      
+                    break;
                 case UNKNOWN:
                     TreePanelUtil.showExtDescNodeDataUserSelectedHelper( getControlPanel(), n, data );
                     break;
@@ -5690,14 +5649,14 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         else if ( getConfiguration().getExtNodeDataReturnOn() == EXT_NODE_DATA_RETURN_ON.WINODW ) {
             if ( sb.length() < 1 ) {
                 TreePanelUtil.showInformationMessage( this, "No Appropriate Data (" + obtainTitleForExtDescNodeData()
-                                                      + ")", "Descendants of selected node do not contain selected data" );
+                        + ")", "Descendants of selected node do not contain selected data" );
                 clearCurrentExternalNodesDataBuffer();
             }
             else {
                 setCurrentExternalNodesDataBuffer( sb );
                 String title;
                 if ( ( getFoundNodes0() != null ) && !getFoundNodes0().isEmpty() ) {
-                    title = ( getOptions().getExtDescNodeDataToReturn() == NODE_DATA.UNKNOWN ? "Data"
+                    title = ( getOptions().getExtDescNodeDataToReturn() == NodeDataField.UNKNOWN ? "Data"
                             : obtainTitleForExtDescNodeData() )
                             + " for "
                             + data.size()
@@ -5705,7 +5664,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                             + size;
                 }
                 else {
-                    title = ( getOptions().getExtDescNodeDataToReturn() == NODE_DATA.UNKNOWN ? "Data"
+                    title = ( getOptions().getExtDescNodeDataToReturn() == NodeDataField.UNKNOWN ? "Data"
                             : obtainTitleForExtDescNodeData() )
                             + " for "
                             + data.size()
@@ -5732,10 +5691,10 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         try {
             if ( ( node.getName().length() > 0 )
                     || ( node.getNodeData().isHasTaxonomy() && !TreePanelUtil.isTaxonomyEmpty( node.getNodeData()
-                                                                                               .getTaxonomy() ) )
-                                                                                               || ( node.getNodeData().isHasSequence() && !TreePanelUtil.isSequenceEmpty( node.getNodeData()
-                                                                                                                                                                          .getSequence() ) ) || ( node.getNodeData().isHasDate() )
-                                                                                                                                                                          || ( node.getNodeData().isHasDistribution() ) || node.getBranchData().isHasConfidences() ) {
+                            .getTaxonomy() ) )
+                    || ( node.getNodeData().isHasSequence() && !TreePanelUtil.isSequenceEmpty( node.getNodeData()
+                            .getSequence() ) ) || ( node.getNodeData().isHasDate() )
+                    || ( node.getNodeData().isHasDistribution() ) || node.getBranchData().isHasConfidences() ) {
                 _popup_buffer.setLength( 0 );
                 short lines = 0;
                 if ( node.getName().length() > 0 ) {
@@ -5899,14 +5858,14 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                             _popup_buffer.append( "] " );
                         }
                         _popup_buffer
-                        .append( FORMATTER_CONFIDENCE.format( ForesterUtil.round( confidence.getValue(),
-                                                                                  getOptions()
-                                                                                  .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
+                                .append( FORMATTER_CONFIDENCE.format( ForesterUtil.round( confidence.getValue(),
+                                                                                          getOptions()
+                                                                                                  .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
                         if ( confidence.getStandardDeviation() != Confidence.CONFIDENCE_DEFAULT_VALUE ) {
                             _popup_buffer.append( " (sd=" );
                             _popup_buffer.append( FORMATTER_CONFIDENCE.format( ForesterUtil.round( confidence
-                                                                                                   .getStandardDeviation(), getOptions()
-                                                                                                   .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
+                                    .getStandardDeviation(), getOptions()
+                                    .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
                             _popup_buffer.append( ")" );
                         }
                     }
@@ -5927,7 +5886,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 if ( _popup_buffer.length() > 0 ) {
                     if ( !getConfiguration().isUseNativeUI() ) {
                         _rollover_popup
-                        .setBorder( BorderFactory.createLineBorder( getTreeColorSet().getBranchColor() ) );
+                                .setBorder( BorderFactory.createLineBorder( getTreeColorSet().getBranchColor() ) );
                         _rollover_popup.setBackground( getTreeColorSet().getBackgroundColor() );
                         if ( isInFoundNodes0( node ) && !isInFoundNodes1( node ) ) {
                             _rollover_popup.setForeground( getTreeColorSet().getFoundColor0() );
@@ -5950,7 +5909,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                                                                                   _rollover_popup,
                                                                                   e.getLocationOnScreen().x + 10,
                                                                                   e.getLocationOnScreen().y
-                                                                                  - ( lines * 20 ) );
+                                                                                          - ( lines * 20 ) );
                     _node_desc_popup.show();
                 }
             }
@@ -6036,7 +5995,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         if ( getMainPanel().getMainFrame() == null ) {
             // Must be "E" applet version.
             ( ( ArchaeopteryxE ) ( ( MainPanelApplets ) getMainPanel() ).getApplet() )
-            .setSelectedTypeInTypeMenu( getPhylogenyGraphicsType() );
+                    .setSelectedTypeInTypeMenu( getPhylogenyGraphicsType() );
         }
         else {
             getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( getPhylogenyGraphicsType() );
index fd537b0..eb9a3b1 100644 (file)
@@ -26,7 +26,7 @@ import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.data.Accession;
 import org.forester.phylogeny.data.Annotation;
 import org.forester.phylogeny.data.BranchColor;
-import org.forester.phylogeny.data.NodeData.NODE_DATA;
+import org.forester.phylogeny.data.NodeDataField;
 import org.forester.phylogeny.data.Sequence;
 import org.forester.phylogeny.data.Taxonomy;
 import org.forester.phylogeny.iterators.PhylogenyNodeIterator;
@@ -178,12 +178,12 @@ public class TreePanelUtil {
             TreePanelUtil
                     .showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getTaxonomy().getCommonName(), sb );
         }
-        if ( ( cp.isShowSeqNames() || cp.isShowSeqSymbols() || cp.isShowSequenceAcc() )
-                && node.getNodeData().isHasSequence()
-                && !ForesterUtil.isEmpty( node.getNodeData().getSequence().getMolecularSequence() ) ) {
-            TreePanelUtil.showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getSequence()
-                    .getMolecularSequence(), sb );
-        }
+//        if ( ( cp.isShowSeqNames() || cp.isShowSeqSymbols() || cp.isShowSequenceAcc() )
+//                && node.getNodeData().isHasSequence()
+//                && !ForesterUtil.isEmpty( node.getNodeData().getSequence().getMolecularSequence() ) ) {
+//            TreePanelUtil.showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getSequence()
+//                    .getMolecularSequence(), sb );
+//        }
         final String s = sb.toString().trim();
         if ( !ForesterUtil.isEmpty( s ) ) {
             data.add( s );
@@ -439,12 +439,11 @@ public class TreePanelUtil {
                 .getSynonyms().isEmpty() );
     }
 
-    static int nodeDataIntoStringBuffer( final List<String> data, final Options optz, final StringBuilder sb ) {
+    static final int nodeDataIntoStringBuffer( final List<String> data, final Options optz, final StringBuilder sb ) {
         final SortedMap<String, Integer> map = new TreeMap<String, Integer>();
         int size = 0;
-        if ( ( optz.getExtDescNodeDataToReturn() != NODE_DATA.SEQUENCE_MOL_SEQ )
-                && ( optz.getExtDescNodeDataToReturn() != NODE_DATA.SEQUENCE_MOL_SEQ_FASTA )
-                && ( optz.getExtDescNodeDataToReturn() != NODE_DATA.GO_TERM_IDS ) ) {
+        if ( ( optz.getExtDescNodeDataToReturn() != NodeDataField.SEQUENCE_MOL_SEQ_FASTA )
+                && ( optz.getExtDescNodeDataToReturn() != NodeDataField.GO_TERM_IDS ) ) {
             for( final String d : data ) {
                 if ( !ForesterUtil.isEmpty( d ) ) {
                     if ( map.containsKey( d ) ) {
@@ -455,9 +454,9 @@ public class TreePanelUtil {
                     }
                 }
             }
-            if ( ( optz.getExtDescNodeDataToReturn() == NODE_DATA.DOMAINS_ALL )
-                    || ( optz.getExtDescNodeDataToReturn() == NODE_DATA.DOMAINS_COLLAPSED_PER_PROTEIN )
-                    || ( optz.getExtDescNodeDataToReturn() == NODE_DATA.SEQ_ANNOTATIONS ) ) {
+            if ( ( optz.getExtDescNodeDataToReturn() == NodeDataField.DOMAINS_ALL )
+                    || ( optz.getExtDescNodeDataToReturn() == NodeDataField.DOMAINS_COLLAPSED_PER_PROTEIN )
+                    || ( optz.getExtDescNodeDataToReturn() == NodeDataField.SEQ_ANNOTATIONS ) ) {
                 final ArrayList<StringInt> sis = new ArrayList<StringInt>();
                 for( final Entry<String, Integer> e : map.entrySet() ) {
                     sis.add( new StringInt( e.getKey(), e.getValue() ) );
index 60d52f3..08b3e2c 100644 (file)
@@ -38,45 +38,6 @@ import org.forester.util.ForesterUtil;
 
 public class NodeData implements PhylogenyData {
 
-    public enum NODE_DATA {
-        NODE_NAME,
-        EVENT,
-        SEQUENCE_NAME,
-        GENE_NAME,
-        SEQUENCE_SYMBOL,
-        SEQUENCE_MOL_SEQ,
-        SEQUENCE_MOL_SEQ_FASTA,
-        SEQUENCE_ACC,
-        TAXONOMY_SCIENTIFIC_NAME,
-        TAXONOMY_COMM0N_NAME,
-        TAXONOMY_CODE,
-        UNKNOWN,
-        GO_TERM_IDS,
-        SEQ_ANNOTATIONS,
-        DOMAINS_ALL,
-        DOMAINS_COLLAPSED_PER_PROTEIN;
-        public String toString() {
-            switch(this) {
-                case DOMAINS_ALL: return "horseshit";
-                case DOMAINS_COLLAPSED_PER_PROTEIN: return "horseshit";
-                case EVENT: return "horseshit";
-                case GENE_NAME: return "horseshit";
-                case GO_TERM_IDS: return "horseshit";
-                case NODE_NAME: return "horseshit";
-                case SEQ_ANNOTATIONS: return "horseshit";
-                case SEQUENCE_ACC: return "horseshit";
-                case SEQUENCE_MOL_SEQ: return "horseshit";
-                case SEQUENCE_MOL_SEQ_FASTA: return "horseshit";
-                case SEQUENCE_NAME: return "horseshit";
-                case SEQUENCE_SYMBOL: return "horseshit";
-                case TAXONOMY_CODE: return "horseshit";
-                case TAXONOMY_COMM0N_NAME: return "horseshit";
-                case TAXONOMY_SCIENTIFIC_NAME: return "horseshit";
-                case UNKNOWN: return "horseshit";
-                default: throw new IllegalArgumentException();
-              }
-        }
-    }
     private String             _node_name;
     private Event              _event;
     private List<Sequence>     _sequences;
diff --git a/forester/java/src/org/forester/phylogeny/data/NodeDataField.java b/forester/java/src/org/forester/phylogeny/data/NodeDataField.java
new file mode 100644 (file)
index 0000000..c779c38
--- /dev/null
@@ -0,0 +1,55 @@
+\r
+package org.forester.phylogeny.data;\r
+\r
+public enum NodeDataField {\r
+    NODE_NAME,\r
+    EVENT,\r
+    SEQUENCE_NAME,\r
+    GENE_NAME,\r
+    SEQUENCE_SYMBOL,\r
+    SEQUENCE_MOL_SEQ_FASTA,\r
+    SEQUENCE_ACC,\r
+    TAXONOMY_SCIENTIFIC_NAME,\r
+    TAXONOMY_CODE,\r
+    UNKNOWN,\r
+    GO_TERM_IDS,\r
+    SEQ_ANNOTATIONS,\r
+    DOMAINS_ALL,\r
+    DOMAINS_COLLAPSED_PER_PROTEIN;\r
+\r
+    \r
+    public String toString() {\r
+        switch ( this ) {\r
+            case DOMAINS_ALL:\r
+                return "Domain";\r
+            case DOMAINS_COLLAPSED_PER_PROTEIN:\r
+                return "Domain (collapsed per protein)";\r
+            case EVENT:\r
+                return "Event";\r
+            case GENE_NAME:\r
+                return "Gene Name";\r
+            case GO_TERM_IDS:\r
+                return "GO Term ID";\r
+            case NODE_NAME:\r
+                return "Node Name";\r
+            case SEQ_ANNOTATIONS:\r
+                return "Sequence Annotation";\r
+            case SEQUENCE_ACC:\r
+                return "Sequence Accessor";\r
+            case SEQUENCE_MOL_SEQ_FASTA:\r
+                return "Molecular Sequence (Fasta)";\r
+            case SEQUENCE_NAME:\r
+                return "Sequence Name";\r
+            case SEQUENCE_SYMBOL:\r
+                return "Sequence Symbol";\r
+            case TAXONOMY_CODE:\r
+                return "Taxonomy Code";\r
+            case TAXONOMY_SCIENTIFIC_NAME:\r
+                return "Scientific Name";\r
+            case UNKNOWN:\r
+                return "User/UI Selected Data Field(s)";\r
+            default:\r
+                throw new IllegalArgumentException();\r
+        }\r
+    }\r
+}
\ No newline at end of file