X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FOptions.java;h=fdaeacb2657618a5f877dd6efd414cce49d39cc4;hb=17b76e136bdd9b46c3d15021cd2cf6bb224695b7;hp=69bd5b8004da4c3698c07cb2a02d9c03f206a0e4;hpb=790ebe51ea3e7fcafc91057f4842453a1c351b61;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/Options.java b/forester/java/src/org/forester/archaeopteryx/Options.java index 69bd5b8..fdaeacb 100644 --- a/forester/java/src/org/forester/archaeopteryx/Options.java +++ b/forester/java/src/org/forester/archaeopteryx/Options.java @@ -31,9 +31,9 @@ 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.NodeVisualization; -import org.forester.phylogeny.data.NodeVisualization.NodeFill; -import org.forester.phylogeny.data.NodeVisualization.NodeShape; +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; /* @@ -42,47 +42,49 @@ import org.forester.util.ForesterUtil; final public class Options { static final double MIN_CONFIDENCE_DEFAULT = 0.0; - 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 _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 NODE_DATA _ext_desc_data_to_return; + private boolean _graphics_export_using_actual_size; private boolean _graphics_export_visible_only; - private int _print_size_x; - private int _print_size_y; + private boolean _internal_number_are_confidence_for_nh_parsing; + private boolean _inverse_search_result; + private boolean _match_whole_terms_only; 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 NH_CONVERSION_SUPPORT_VALUE_STYLE _nh_conversion_support_value_style; + private boolean _nh_parsing_replace_underscores; private NODE_LABEL_DIRECTION _node_label_direction; - private Font _base_font; - private boolean _match_whole_terms_only; - private boolean _search_case_sensitive; + 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 boolean _inverse_search_result; + private int _print_size_x; + private int _print_size_y; + private boolean _print_using_actual_size; 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 TAXONOMY_EXTRACTION _taxonomy_extraction; - 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; - private NodeVisualization.NodeShape _default_node_shape; - private NodeVisualization.NodeFill _default_node_fill; - private short _default_node_shape_size; - private boolean _taxonomy_colorize_node_shapes; - private boolean _show_default_node_shapes_internal; - private boolean _show_default_node_shapes_external; + private boolean _search_case_sensitive; + private boolean _show_annotation_ref_source; + private boolean _show_branch_length_values; private boolean _show_confidence_stddev; - private NH_CONVERSION_SUPPORT_VALUE_STYLE _nh_conversion_support_value_style; - private NODE_DATA _ext_desc_data_to_return; + 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 Options() { init(); @@ -92,10 +94,26 @@ final public class Options { return _ext_desc_data_to_return; } + public boolean isAllowErrorsInDistanceToParent() { + return _allow_errors_in_distance_to_parent; + } + + public boolean isAllowFontSizeChange() { + return true; + } + + public final boolean isShowAnnotationRefSource() { + return _show_annotation_ref_source; + } + public final boolean isShowDomainLabels() { return _show_domain_labels; } + public final void setAllowErrorsInDistanceToParent( final boolean allow_errors_in_distance_to_parent ) { + _allow_errors_in_distance_to_parent = allow_errors_in_distance_to_parent; + } + public void setBackgroundColorGradient( final boolean background_color_gradient ) { _background_color_gradient = background_color_gradient; } @@ -108,6 +126,10 @@ final public class Options { _ext_desc_data_to_return = ext_desc_data_to_return; } + 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; } @@ -200,6 +222,10 @@ final public class Options { return _background_color_gradient; } + final boolean isColorByTaxonomicGroup() { + return _color_by_taxonomic_group; + } + final boolean isColorLabelsSameAsParentBranch() { return _color_labels_same_as_parent_branch; } @@ -268,10 +294,6 @@ final public class Options { return _show_scale; } - boolean isTaxonomyColorizeNodeShapes() { - return _taxonomy_colorize_node_shapes; - } - final void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) { _abbreviate_scientific_names = abbreviate_scientific_names; } @@ -292,6 +314,10 @@ final public class Options { _cladogram_type = cladogram_type; } + final void setColorByTaxonomicGroup( final boolean color_by_taxonomic_group ) { + _color_by_taxonomic_group = color_by_taxonomic_group; + } + final void setDefaultNodeFill( final NodeFill default_node_fill ) { _default_node_fill = default_node_fill; } @@ -410,11 +436,7 @@ final public class Options { _show_scale = show_scale; } - void setTaxonomyColorizeNodeShapes( final boolean taxonomy_colorize_node_shapes ) { - _taxonomy_colorize_node_shapes = taxonomy_colorize_node_shapes; - } - - final void setTaxonomyExtractio( final TAXONOMY_EXTRACTION taxonomy_extraction ) { + final void setTaxonomyExtraction( final TAXONOMY_EXTRACTION taxonomy_extraction ) { _taxonomy_extraction = taxonomy_extraction; } @@ -422,7 +444,6 @@ final public class Options { _default_node_shape = NodeShape.CIRCLE; _default_node_fill = NodeFill.GRADIENT; _default_node_shape_size = Constants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT; - _taxonomy_colorize_node_shapes = false; _show_branch_length_values = false; _internal_number_are_confidence_for_nh_parsing = false; _show_scale = false; @@ -458,9 +479,10 @@ final public class Options { _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; _nh_parsing_replace_underscores = false; - _taxonomy_extraction = TAXONOMY_EXTRACTION.PFAM_STYLE_ONLY; + _taxonomy_extraction = TAXONOMY_EXTRACTION.NO; _cladogram_type = Constants.CLADOGRAM_TYPE_DEFAULT; _show_domain_labels = true; + _show_annotation_ref_source = true; setAbbreviateScientificTaxonNames( false ); _color_labels_same_as_parent_branch = false; _show_confidence_stddev = true; @@ -483,6 +505,7 @@ final public class Options { 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() ); @@ -496,13 +519,14 @@ final public class Options { instance.setNumberOfDigitsAfterCommaForConfidenceValues( configuration .getNumberOfDigitsAfterCommaForConfidenceValues() ); } - instance.setTaxonomyExtractio( configuration.getTaxonomyExtraction() ); + 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() ); @@ -532,12 +556,12 @@ final public class Options { if ( configuration.getDefaultNodeShapeSize() >= 0 ) { instance.setDefaultNodeShapeSize( configuration.getDefaultNodeShapeSize() ); } - instance.setTaxonomyColorizeNodeShapes( configuration.isTaxonomyColorizeNodeShapes() ); instance.setShowDefaultNodeShapesInternal( configuration.isShowDefaultNodeShapesInternal() ); instance.setShowDefaultNodeShapesExternal( configuration.isShowDefaultNodeShapesExternal() ); if ( configuration.getExtDescNodeDataToReturn() != null ) { instance.setExtDescNodeDataToReturn( configuration.getExtDescNodeDataToReturn() ); } + instance.setAllowErrorsInDistanceToParent( false ); } return instance; } @@ -547,7 +571,7 @@ final public class Options { } public static enum CLADOGRAM_TYPE { - NON_LINED_UP, EXT_NODE_SUM_DEP, TOTAL_NODE_SUM_DEP; + EXT_NODE_SUM_DEP, NON_LINED_UP, TOTAL_NODE_SUM_DEP; } public static enum NODE_LABEL_DIRECTION { @@ -555,14 +579,14 @@ final public class Options { } public static enum PHYLOGENY_GRAPHICS_TYPE { - RECTANGULAR, TRIANGULAR, EURO_STYLE, ROUNDED, CONVEX, CURVED, UNROOTED, CIRCULAR; + CIRCULAR, CONVEX, CURVED, EURO_STYLE, RECTANGULAR, ROUNDED, TRIANGULAR, UNROOTED; } static enum OVERVIEW_PLACEMENT_TYPE { - UPPER_LEFT( "upper left" ), - UPPER_RIGHT( "upper right" ), LOWER_LEFT( "lower left" ), - LOWER_RIGHT( "lower right" ); + LOWER_RIGHT( "lower right" ), + UPPER_LEFT( "upper left" ), + UPPER_RIGHT( "upper right" ); private final String _name;