in progress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / Options.java
index f025733..8494510 100644 (file)
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.archaeopteryx;
 
 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.NodeDataField;
+import org.forester.phylogeny.data.NodeVisualData;
+import org.forester.phylogeny.data.NodeVisualData.NodeFill;
+import org.forester.phylogeny.data.NodeVisualData.NodeShape;
 import org.forester.util.ForesterUtil;
 
 /*
@@ -34,100 +40,151 @@ import org.forester.util.ForesterUtil;
  */
 final public class Options {
 
-    static final double             MIN_CONFIDENCE_DEFAULT = 0.0;
-    private NodeShape               _default_node_shape;
-    private boolean                 _show_branch_length_values;
-    private boolean                 _internal_number_are_confidence_for_nh_parsing;
-    private boolean                 _show_scale;
-    private boolean                 _show_overview;
-    private boolean                 _antialias_screen;
-    private boolean                 _antialias_print;
-    private boolean                 _graphics_export_visible_only;
-    private int                     _print_size_x;
-    private int                     _print_size_y;
-    private double                  _min_confidence_value;
-    private boolean                 _print_black_and_white;
-    private boolean                 _print_using_actual_size;
-    private boolean                 _graphics_export_using_actual_size;
-    private PHYLOGENY_GRAPHICS_TYPE _phylogeny_graphics_type;
-    private CLADOGRAM_TYPE          _cladogram_type;
-    private OVERVIEW_PLACEMENT_TYPE _ov_placement;
-    private NODE_LABEL_DIRECTION    _node_label_direction;
-    private Font                    _base_font;
-    private boolean                 _match_whole_terms_only;
-    private boolean                 _search_case_sensitive;
-    private float                   _print_line_width;
-    private boolean                 _inverse_search_result;
-    private double                  _scale_bar_length;
-    private short                   _number_of_digits_after_comma_for_confidence_values;
-    private short                   _number_of_digits_after_comma_for_branch_length_values;
-    private boolean                 _nh_parsing_replace_underscores;
-    private boolean                 _nh_parsing_extract_pfam_taxonomy_codes;
-    private boolean                 _editable;
-    private boolean                 _background_color_gradient;
-    private boolean                 _show_domain_labels;
-    private boolean                 _color_labels_same_as_parent_branch;
-    private boolean                 _abbreviate_scientific_names;
-
-    enum NodeShape {
-        NONE, CIRCLE_WITH_GRADIENT, CIRCLE_SOLID, RECTANGLE_WITH_GRADIENT, RECTANGLE_SOLID;
+    public static enum CLADOGRAM_TYPE {
+        EXT_NODE_SUM_DEP, NON_LINED_UP, TOTAL_NODE_SUM_DEP;
     }
 
+    public static enum NODE_LABEL_DIRECTION {
+        HORIZONTAL, RADIAL;
+    }
+
+    public static enum PHYLOGENY_GRAPHICS_TYPE {
+        CIRCULAR, CONVEX, CURVED, EURO_STYLE, RECTANGULAR, ROUNDED, TRIANGULAR, UNROOTED;
+    }
+
+    static enum OVERVIEW_PLACEMENT_TYPE {
+        LOWER_LEFT( "lower left" ),
+        LOWER_RIGHT( "lower right" ),
+        UPPER_LEFT( "upper left" ),
+        UPPER_RIGHT( "upper right" );
+
+        private final String _name;
+
+        private OVERVIEW_PLACEMENT_TYPE( final String name ) {
+            _name = name;
+        }
+
+        @Override
+        public String toString() {
+            return _name;
+        }
+
+        public String toTag() {
+            return toString().replaceAll( " ", "_" );
+        }
+    }
+    static final double                       MIN_CONFIDENCE_DEFAULT = 0.0;
+    private boolean                           _abbreviate_scientific_names;
+    private boolean                           _allow_errors_in_distance_to_parent;
+    private boolean                           _antialias_print;
+    private boolean                           _antialias_screen;
+    private boolean                           _background_color_gradient;
+    private Font                              _base_font;
+    private CLADOGRAM_TYPE                    _cladogram_type;
+    private boolean                           _color_by_taxonomic_group;
+    private boolean                           _color_labels_same_as_parent_branch;
+    private NodeVisualData.NodeFill           _default_node_fill;
+    private NodeVisualData.NodeShape          _default_node_shape;
+    private short                             _default_node_shape_size;
+    private boolean                           _editable;
+    private NodeDataField                     _ext_desc_data_to_return;
+    private final boolean                     _graphics_export_using_actual_size = true;
+    private boolean                           _graphics_export_visible_only;
+    private boolean                           _internal_number_are_confidence_for_nh_parsing;
+    private boolean                           _inverse_search_result;
+    private boolean                           _match_whole_terms_only;
+    private boolean                           _search_with_regex;
+    private double                            _min_confidence_value;
+    private NH_CONVERSION_SUPPORT_VALUE_STYLE _nh_conversion_support_value_style;
+    private boolean                           _nh_parsing_replace_underscores;
+    private NODE_LABEL_DIRECTION              _node_label_direction;
+    private short                             _number_of_digits_after_comma_for_branch_length_values;
+    private short                             _number_of_digits_after_comma_for_confidence_values;
+    private OVERVIEW_PLACEMENT_TYPE           _ov_placement;
+    private PHYLOGENY_GRAPHICS_TYPE           _phylogeny_graphics_type;
+    private boolean                           _print_black_and_white;
+    private float                             _print_line_width;
+    private final boolean                     _print_using_actual_size = true;
+    private double                            _scale_bar_length;
+    private boolean                           _search_case_sensitive;
+    private boolean                           _show_annotation_ref_source;
+    private boolean                           _show_confidence_stddev;
+    private boolean                           _show_default_node_shapes_for_marked_nodes;
+    private boolean                           _show_default_node_shapes_external;
+    private boolean                           _show_default_node_shapes_internal;
+    private boolean                           _show_domain_labels;
+    private boolean                           _show_overview;
+    private boolean                           _show_scale;
+    private TAXONOMY_EXTRACTION               _taxonomy_extraction;
+    private boolean                           _line_up_renderable_node_data;
+    private boolean                           _right_align_domains;
+    private boolean                           _color_all_found_nodes_when_coloring_subtree;
+    private boolean                           _parse_beast_style_extended_nexus_tags;
+
     private Options() {
         init();
     }
 
-    final Font getBaseFont() {
-        return _base_font;
+    public NodeDataField getExtDescNodeDataToReturn() {
+        return _ext_desc_data_to_return;
     }
 
-    final CLADOGRAM_TYPE getCladogramType() {
-        return _cladogram_type;
+    public boolean isAllowErrorsInDistanceToParent() {
+        return _allow_errors_in_distance_to_parent;
     }
 
-    final double getMinConfidenceValue() {
-        return _min_confidence_value;
+    final public boolean isLineUpRendarableNodeData() {
+        return _line_up_renderable_node_data;
     }
 
-    final NODE_LABEL_DIRECTION getNodeLabelDirection() {
-        return _node_label_direction;
+    final public boolean isRightLineUpDomains() {
+        return _right_align_domains;
     }
 
-    final short getNumberOfDigitsAfterCommaForBranchLengthValues() {
-        return _number_of_digits_after_comma_for_branch_length_values;
+    public final boolean isShowAnnotationRefSource() {
+        return _show_annotation_ref_source;
     }
 
-    final short getNumberOfDigitsAfterCommaForConfidenceValues() {
-        return _number_of_digits_after_comma_for_confidence_values;
+    public final boolean isShowDomainLabels() {
+        return _show_domain_labels;
     }
 
-    final OVERVIEW_PLACEMENT_TYPE getOvPlacement() {
-        return _ov_placement;
+    public final void setAllowErrorsInDistanceToParent( final boolean allow_errors_in_distance_to_parent ) {
+        _allow_errors_in_distance_to_parent = allow_errors_in_distance_to_parent;
     }
 
-    final PHYLOGENY_GRAPHICS_TYPE getPhylogenyGraphicsType() {
-        return _phylogeny_graphics_type;
+    public void setBackgroundColorGradient( final boolean background_color_gradient ) {
+        _background_color_gradient = background_color_gradient;
     }
 
-    final float getPrintLineWidth() {
-        return _print_line_width;
+    public void setColorLabelsSameAsParentBranch( final boolean color_labels_same_as_parent_branch ) {
+        _color_labels_same_as_parent_branch = color_labels_same_as_parent_branch;
     }
 
-    final int getPrintSizeX() {
-        return _print_size_x;
+    public void setExtDescNodeDataToReturn( final NodeDataField ext_desc_data_to_return ) {
+        _ext_desc_data_to_return = ext_desc_data_to_return;
     }
 
-    final int getPrintSizeY() {
-        return _print_size_y;
+    final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data ) {
+        _line_up_renderable_node_data = line_up_renderable_node_data;
     }
 
-    final double getScaleBarLength() {
-        return _scale_bar_length;
+    final public void setRightLineUpDomains( final boolean right_align_domains ) {
+        _right_align_domains = right_align_domains;
+    }
+
+    public final void setShowAnnotationRefSource( final boolean show_annotation_ref_source ) {
+        _show_annotation_ref_source = show_annotation_ref_source;
+    }
+
+    public void setShowDomainLabels( final boolean show_domain_labels ) {
+        _show_domain_labels = show_domain_labels;
     }
 
     final private void init() {
-        _default_node_shape = NodeShape.RECTANGLE_WITH_GRADIENT;
-        _show_branch_length_values = false;
+        _default_node_shape = NodeShape.CIRCLE;
+        _default_node_fill = NodeFill.GRADIENT;
+        _default_node_shape_size = AptxConstants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT;
         _internal_number_are_confidence_for_nh_parsing = false;
         _show_scale = false;
         _antialias_screen = true;
@@ -135,36 +192,114 @@ final public class Options {
         _graphics_export_visible_only = false;
         _editable = true;
         _background_color_gradient = false;
-        if ( Util.isUsOrCanada() ) {
-            _print_size_x = Constants.US_LETTER_SIZE_X;
-            _print_size_y = Constants.US_LETTER_SIZE_Y;
-        }
-        else {
-            _print_size_x = Constants.A4_SIZE_X;
-            _print_size_y = Constants.A4_SIZE_Y;
-        }
+        _show_default_node_shapes_internal = false;
+        _show_default_node_shapes_external = false;
+        _show_default_node_shapes_for_marked_nodes = false;
+        _color_all_found_nodes_when_coloring_subtree = false;
+        _parse_beast_style_extended_nexus_tags= true;
         _min_confidence_value = MIN_CONFIDENCE_DEFAULT;
         _print_black_and_white = false;
-        _print_using_actual_size = false;
-        _graphics_export_using_actual_size = true;
         _phylogeny_graphics_type = PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR;
         _base_font = new Font( Configuration.getDefaultFontFamilyName(), Font.PLAIN, 10 );
         _match_whole_terms_only = false;
+        _search_with_regex = false;
         _search_case_sensitive = false;
-        _print_line_width = Constants.PDF_LINE_WIDTH_DEFAULT;
+        _print_line_width = AptxConstants.PDF_LINE_WIDTH_DEFAULT;
         _show_overview = true;
         _ov_placement = OVERVIEW_PLACEMENT_TYPE.UPPER_LEFT;
         _node_label_direction = NODE_LABEL_DIRECTION.HORIZONTAL;
         _inverse_search_result = false;
         _scale_bar_length = 0.0;
-        _number_of_digits_after_comma_for_branch_length_values = Constants.NUMBER_OF_DIGITS_AFTER_COMMA_FOR_BRANCH_LENGTH_VALUES_DEFAULT;
-        _number_of_digits_after_comma_for_confidence_values = Constants.NUMBER_OF_DIGITS_AFTER_COMMA_FOR_CONFIDENCE_VALUES_DEFAULT;
+        _number_of_digits_after_comma_for_branch_length_values = AptxConstants.NUMBER_OF_DIGITS_AFTER_COMMA_FOR_BRANCH_LENGTH_VALUES_DEFAULT;
+        _number_of_digits_after_comma_for_confidence_values = AptxConstants.NUMBER_OF_DIGITS_AFTER_COMMA_FOR_CONFIDENCE_VALUES_DEFAULT;
         _nh_parsing_replace_underscores = false;
-        _nh_parsing_extract_pfam_taxonomy_codes = false;
-        _cladogram_type = Constants.CLADOGRAM_TYPE_DEFAULT;
+        _taxonomy_extraction = TAXONOMY_EXTRACTION.NO;
+        _cladogram_type = AptxConstants.CLADOGRAM_TYPE_DEFAULT;
         _show_domain_labels = true;
+        _show_annotation_ref_source = true;
         setAbbreviateScientificTaxonNames( false );
         _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 = NodeDataField.UNKNOWN;
+        _line_up_renderable_node_data = true;
+        _right_align_domains = false;
+    }
+
+    final private void setNumberOfDigitsAfterCommaForBranchLength( final short number_of_digits_after_comma_for_branch_length_values ) {
+        _number_of_digits_after_comma_for_branch_length_values = number_of_digits_after_comma_for_branch_length_values;
+    }
+
+    final private void setNumberOfDigitsAfterCommaForConfidenceValues( final short number_of_digits_after_comma_for_confidence_values ) {
+        _number_of_digits_after_comma_for_confidence_values = number_of_digits_after_comma_for_confidence_values;
+    }
+
+    final Font getBaseFont() {
+        return _base_font;
+    }
+
+    final CLADOGRAM_TYPE getCladogramType() {
+        return _cladogram_type;
+    }
+
+    final NodeFill getDefaultNodeFill() {
+        return _default_node_fill;
+    }
+
+    final NodeShape getDefaultNodeShape() {
+        return _default_node_shape;
+    }
+
+    final short getDefaultNodeShapeSize() {
+        return _default_node_shape_size;
+    }
+
+    final double getMinConfidenceValue() {
+        return _min_confidence_value;
+    }
+
+    NH_CONVERSION_SUPPORT_VALUE_STYLE getNhConversionSupportValueStyle() {
+        return _nh_conversion_support_value_style;
+    }
+
+    final NODE_LABEL_DIRECTION getNodeLabelDirection() {
+        return _node_label_direction;
+    }
+
+    final short getNumberOfDigitsAfterCommaForBranchLengthValues() {
+        return _number_of_digits_after_comma_for_branch_length_values;
+    }
+
+    final short getNumberOfDigitsAfterCommaForConfidenceValues() {
+        return _number_of_digits_after_comma_for_confidence_values;
+    }
+
+    final OVERVIEW_PLACEMENT_TYPE getOvPlacement() {
+        return _ov_placement;
+    }
+
+    final PHYLOGENY_GRAPHICS_TYPE getPhylogenyGraphicsType() {
+        return _phylogeny_graphics_type;
+    }
+
+    final float getPrintLineWidth() {
+        return _print_line_width;
+    }
+
+    final double getScaleBarLength() {
+        return _scale_bar_length;
+    }
+
+    final TAXONOMY_EXTRACTION getTaxonomyExtraction() {
+        return _taxonomy_extraction;
+    }
+
+    final boolean isAbbreviateScientificTaxonNames() {
+        return _abbreviate_scientific_names;
+    }
+
+    boolean isAllowMagnificationOfTaxonomyImages() {
+        return true;
     }
 
     final boolean isAntialiasPrint() {
@@ -179,8 +314,8 @@ final public class Options {
         return _background_color_gradient;
     }
 
-    public final boolean isShowDomainLabels() {
-        return _show_domain_labels;
+    final boolean isColorByTaxonomicGroup() {
+        return _color_by_taxonomic_group;
     }
 
     final boolean isColorLabelsSameAsParentBranch() {
@@ -191,10 +326,6 @@ final public class Options {
         return _editable;
     }
 
-    final boolean isExtractPfamTaxonomyCodesInNhParsing() {
-        return _nh_parsing_extract_pfam_taxonomy_codes;
-    }
-
     final boolean isGraphicsExportUsingActualSize() {
         return _graphics_export_using_actual_size;
     }
@@ -231,12 +362,24 @@ final public class Options {
         return _search_case_sensitive;
     }
 
-    final boolean isShowBranchLengthValues() {
-        return _show_branch_length_values;
+    final boolean isSearchWithRegex() {
+        return _search_with_regex;
     }
 
-    final NodeShape getDefaultNodeShape() {
-        return _default_node_shape;
+    boolean isShowConfidenceStddev() {
+        return _show_confidence_stddev;
+    }
+
+    boolean isShowDefaultNodeShapesExternal() {
+        return _show_default_node_shapes_external;
+    }
+
+    boolean isShowDefaultNodeShapesForMarkedNodes() {
+        return _show_default_node_shapes_for_marked_nodes;
+    }
+
+    boolean isShowDefaultNodeShapesInternal() {
+        return _show_default_node_shapes_internal;
     }
 
     final boolean isShowOverview() {
@@ -247,6 +390,10 @@ final public class Options {
         return _show_scale;
     }
 
+    final void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) {
+        _abbreviate_scientific_names = abbreviate_scientific_names;
+    }
+
     final void setAntialiasPrint( final boolean antialias_print ) {
         _antialias_print = antialias_print;
     }
@@ -255,18 +402,6 @@ final public class Options {
         _antialias_screen = antialias_screen;
     }
 
-    public void setBackgroundColorGradient( final boolean background_color_gradient ) {
-        _background_color_gradient = background_color_gradient;
-    }
-
-    public void setShowDomainLabels( final boolean show_domain_labels ) {
-        _show_domain_labels = show_domain_labels;
-    }
-
-    public void setColorLabelsSameAsParentBranch( final boolean color_labels_same_as_parent_branch ) {
-        _color_labels_same_as_parent_branch = color_labels_same_as_parent_branch;
-    }
-
     final void setBaseFont( final Font base_font ) {
         _base_font = base_font;
     }
@@ -275,26 +410,28 @@ final public class Options {
         _cladogram_type = cladogram_type;
     }
 
-    final void setEditable( final boolean editable ) {
-        _editable = editable;
+    final void setColorByTaxonomicGroup( final boolean color_by_taxonomic_group ) {
+        _color_by_taxonomic_group = color_by_taxonomic_group;
     }
 
-    final void setExtractPfamTaxonomyCodesInNhParsing( final boolean nh_parsing_extract_pfam_taxonomy_codes ) {
-        _nh_parsing_extract_pfam_taxonomy_codes = nh_parsing_extract_pfam_taxonomy_codes;
+    final void setDefaultNodeFill( final NodeFill default_node_fill ) {
+        _default_node_fill = default_node_fill;
     }
 
-    final void setGraphicsExportUsingActualSize( final boolean graphics_export_using_actual_size ) {
-        _graphics_export_using_actual_size = graphics_export_using_actual_size;
-        if ( !graphics_export_using_actual_size ) {
-            setGraphicsExportVisibleOnly( false );
-        }
+    final void setDefaultNodeShape( final NodeShape default_node_shape ) {
+        _default_node_shape = default_node_shape;
+    }
+
+    final void setDefaultNodeShapeSize( final short default_node_shape_size ) {
+        _default_node_shape_size = default_node_shape_size;
+    }
+
+    final void setEditable( final boolean editable ) {
+        _editable = editable;
     }
 
     final void setGraphicsExportVisibleOnly( final boolean graphics_export_visible_only ) {
         _graphics_export_visible_only = graphics_export_visible_only;
-        if ( graphics_export_visible_only ) {
-            setGraphicsExportUsingActualSize( true );
-        }
     }
 
     final void setInternalNumberAreConfidenceForNhParsing( final boolean internal_number_are_confidence_for_nh_parsing ) {
@@ -313,16 +450,12 @@ final public class Options {
         _min_confidence_value = min_confidence_value;
     }
 
-    final void setNodeLabelDirection( final NODE_LABEL_DIRECTION node_label_direction ) {
-        _node_label_direction = node_label_direction;
-    }
-
-    final private void setNumberOfDigitsAfterCommaForBranchLength( final short number_of_digits_after_comma_for_branch_length_values ) {
-        _number_of_digits_after_comma_for_branch_length_values = number_of_digits_after_comma_for_branch_length_values;
+    void setNhConversionSupportValueStyle( final NH_CONVERSION_SUPPORT_VALUE_STYLE nh_conversion_support_value_style ) {
+        _nh_conversion_support_value_style = nh_conversion_support_value_style;
     }
 
-    final private void setNumberOfDigitsAfterCommaForConfidenceValues( final short number_of_digits_after_comma_for_confidence_values ) {
-        _number_of_digits_after_comma_for_confidence_values = number_of_digits_after_comma_for_confidence_values;
+    final void setNodeLabelDirection( final NODE_LABEL_DIRECTION node_label_direction ) {
+        _node_label_direction = node_label_direction;
     }
 
     final void setOvPlacement( final OVERVIEW_PLACEMENT_TYPE ov_placement ) {
@@ -340,19 +473,7 @@ final public class Options {
     final void setPrintLineWidth( final float print_line_width ) {
         _print_line_width = print_line_width;
     }
-
-    final void setPrintSizeX( final int print_size_x ) {
-        _print_size_x = print_size_x;
-    }
-
-    final void setPrintSizeY( final int print_size_y ) {
-        _print_size_y = print_size_y;
-    }
-
-    final void setPrintUsingActualSize( final boolean print_using_actual_size ) {
-        _print_using_actual_size = print_using_actual_size;
-    }
-
+    
     final void setReplaceUnderscoresInNhParsing( final boolean nh_parsing_replace_underscores ) {
         _nh_parsing_replace_underscores = nh_parsing_replace_underscores;
     }
@@ -365,12 +486,24 @@ final public class Options {
         _search_case_sensitive = search_case_sensitive;
     }
 
-    final void setShowBranchLengthValues( final boolean show_branch_length_values ) {
-        _show_branch_length_values = show_branch_length_values;
+    final void setSearchWithRegex( final boolean search_with_regex ) {
+        _search_with_regex = search_with_regex;
     }
 
-    final void setDefaultNodeShape( final NodeShape default_node_shape ) {
-        _default_node_shape = default_node_shape;
+    void setShowConfidenceStddev( final boolean show_confidence_stddev ) {
+        _show_confidence_stddev = show_confidence_stddev;
+    }
+
+    void setShowDefaultNodeShapesExternal( final boolean show_default_node_shapes_external ) {
+        _show_default_node_shapes_external = show_default_node_shapes_external;
+    }
+
+    void setShowDefaultNodeShapesForMarkedNodes( final boolean show_default_node_shapes_for_marked_nodes ) {
+        _show_default_node_shapes_for_marked_nodes = show_default_node_shapes_for_marked_nodes;
+    }
+
+    void setShowDefaultNodeShapesInternal( final boolean show_default_node_shapes_internal ) {
+        _show_default_node_shapes_internal = show_default_node_shapes_internal;
     }
 
     final void setShowOverview( final boolean show_overview ) {
@@ -381,17 +514,17 @@ final public class Options {
         _show_scale = show_scale;
     }
 
-    final static Options createDefaultInstance() {
-        return new Options();
+    final void setTaxonomyExtraction( final TAXONOMY_EXTRACTION taxonomy_extraction ) {
+        _taxonomy_extraction = taxonomy_extraction;
     }
 
-    final static Options createInstance( final Configuration configuration ) {
+    public final static Options createInstance( final Configuration configuration ) {
         final Options instance = createDefaultInstance();
         if ( configuration != null ) {
             instance.setAntialiasScreen( configuration.isAntialiasScreen() );
             instance.setShowScale( configuration.isShowScale() );
-            instance.setShowBranchLengthValues( configuration.isShowBranchLengthValues() );
             instance.setShowOverview( configuration.isShowOverview() );
+            instance.setColorByTaxonomicGroup( configuration.isColorByTaxonomicGroup() );
             instance.setCladogramType( configuration.getCladogramType() );
             instance.setOvPlacement( configuration.getOvPlacement() );
             instance.setPrintLineWidth( configuration.getPrintLineWidth() );
@@ -405,23 +538,18 @@ final public class Options {
                 instance.setNumberOfDigitsAfterCommaForConfidenceValues( configuration
                         .getNumberOfDigitsAfterCommaForConfidenceValues() );
             }
-            instance.setExtractPfamTaxonomyCodesInNhParsing( configuration.isExtractPfamTaxonomyCodesInNhParsing() );
+            instance.setTaxonomyExtraction( configuration.getTaxonomyExtraction() );
             instance.setReplaceUnderscoresInNhParsing( configuration.isReplaceUnderscoresInNhParsing() );
             instance.setInternalNumberAreConfidenceForNhParsing( configuration
                     .isInternalNumberAreConfidenceForNhParsing() );
             instance.setEditable( configuration.isEditable() );
             instance.setColorLabelsSameAsParentBranch( configuration.isColorLabelsSameAsParentBranch() );
             instance.setShowDomainLabels( configuration.isShowDomainLabels() );
+            instance.setShowAnnotationRefSource( configuration.isShowAnnotationRefSource() );
             instance.setAbbreviateScientificTaxonNames( configuration.isAbbreviateScientificTaxonNames() );
             if ( configuration.getMinConfidenceValue() != MIN_CONFIDENCE_DEFAULT ) {
                 instance.setMinConfidenceValue( configuration.getMinConfidenceValue() );
             }
-            if ( configuration.getGraphicsExportX() > 0 ) {
-                instance.setPrintSizeX( configuration.getGraphicsExportX() );
-            }
-            if ( configuration.getGraphicsExportY() > 0 ) {
-                instance.setPrintSizeY( configuration.getGraphicsExportY() );
-            }
             if ( configuration.getBaseFontSize() > 0 ) {
                 instance.setBaseFont( instance.getBaseFont().deriveFont( ( float ) configuration.getBaseFontSize() ) );
             }
@@ -432,58 +560,45 @@ final public class Options {
             if ( configuration.getPhylogenyGraphicsType() != null ) {
                 instance.setPhylogenyGraphicsType( configuration.getPhylogenyGraphicsType() );
             }
+            if ( configuration.getDefaultNodeFill() != null ) {
+                instance.setDefaultNodeFill( configuration.getDefaultNodeFill() );
+            }
+            if ( configuration.getDefaultNodeShape() != null ) {
+                instance.setDefaultNodeShape( configuration.getDefaultNodeShape() );
+            }
+            if ( configuration.getDefaultNodeShapeSize() >= 0 ) {
+                instance.setDefaultNodeShapeSize( configuration.getDefaultNodeShapeSize() );
+            }
+            instance.setShowDefaultNodeShapesInternal( configuration.isShowDefaultNodeShapesInternal() );
+            instance.setShowDefaultNodeShapesExternal( configuration.isShowDefaultNodeShapesExternal() );
+            instance.setShowDefaultNodeShapesForMarkedNodes( configuration.isShowDefaultNodeShapesForMarkedNodes() );
+            if ( configuration.getExtDescNodeDataToReturn() != null ) {
+                instance.setExtDescNodeDataToReturn( configuration.getExtDescNodeDataToReturn() );
+            }
+            instance.setRightLineUpDomains( configuration.isRightLineUpDomains() );
+            instance.setLineUpRendarableNodeData( configuration.isLineUpRendarableNodeData() );
+            instance.setAllowErrorsInDistanceToParent( false );
         }
         return instance;
     }
 
-    final void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) {
-        _abbreviate_scientific_names = abbreviate_scientific_names;
-    }
-
-    final boolean isAbbreviateScientificTaxonNames() {
-        return _abbreviate_scientific_names;
-    }
-
-    static enum CLADOGRAM_TYPE {
-        NON_LINED_UP, EXT_NODE_SUM_DEP, TOTAL_NODE_SUM_DEP;
+    final static Options createDefaultInstance() {
+        return new Options();
     }
 
-    static enum NODE_LABEL_DIRECTION {
-        HORIZONTAL, RADIAL;
+    final boolean isColorAllFoundNodesWhenColoringSubtree() {
+        return _color_all_found_nodes_when_coloring_subtree;
     }
-
-    static enum OVERVIEW_PLACEMENT_TYPE {
-        UPPER_LEFT( "upper left" ),
-        UPPER_RIGHT( "upper right" ),
-        LOWER_LEFT( "lower left" ),
-        LOWER_RIGHT( "lower right" );
-
-        private final String _name;
-
-        private OVERVIEW_PLACEMENT_TYPE( final String name ) {
-            _name = name;
-        }
-
-        @Override
-        public String toString() {
-            return _name;
-        }
-
-        public String toTag() {
-            return toString().replaceAll( " ", "_" );
-        }
+    
+    final void setColorAllFoundNodesWhenColoringSubtree( final boolean color_all_found_nodes_when_coloring_subtree ) {
+        _color_all_found_nodes_when_coloring_subtree = color_all_found_nodes_when_coloring_subtree;
     }
 
-    static enum PHYLOGENY_GRAPHICS_TYPE {
-        RECTANGULAR, TRIANGULAR, EURO_STYLE, ROUNDED, CONVEX, CURVED, UNROOTED, CIRCULAR;
-    }
-
-    boolean isAllowMagnificationOfTaxonomyImages() {
-        return true;
+    final boolean isParseBeastStyleExtendedNexusTags() {
+        return _parse_beast_style_extended_nexus_tags;
     }
 
-    int getDefaultNodeBoxSize() {
-        // TODO make variable ~~
-        return 8;
+    final void setParseBeastStyleExtendedNexusTags( boolean parse_beast_style_extended_nexus_tags ) {
+        _parse_beast_style_extended_nexus_tags = parse_beast_style_extended_nexus_tags;
     }
 }