From: cmzmasek@gmail.com Date: Tue, 8 Jan 2013 20:14:47 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=790ebe51ea3e7fcafc91057f4842453a1c351b61;p=jalview.git inprogress --- diff --git a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java index 5b091b4..9146fe8 100644 --- a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java +++ b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java @@ -113,7 +113,8 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { private JMenuItem _collapse_species_specific_subtrees; private JMenuItem _overview_placment_mi; private ButtonGroup _radio_group_1; - private JCheckBoxMenuItem _show_default_node_shapes_cbmi; + private JCheckBoxMenuItem _show_default_node_shapes_internal_cbmi; + private JCheckBoxMenuItem _show_default_node_shapes_external_cbmi; private JMenuItem _cycle_node_shape_mi; private JMenuItem _cycle_node_fill_mi; private JMenuItem _choose_node_size_mi; @@ -266,7 +267,10 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { else if ( o == _color_labels_same_as_parent_branch ) { updateOptions( getOptions() ); } - else if ( o == _show_default_node_shapes_cbmi ) { + else if ( o == _show_default_node_shapes_internal_cbmi ) { + updateOptions( getOptions() ); + } + else if ( o == _show_default_node_shapes_external_cbmi ) { updateOptions( getOptions() ); } else if ( o == _taxonomy_colorize_node_shapes_cbmi ) { @@ -620,7 +624,9 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) ); _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( MainFrame.SHOW_CONF_STDDEV_LABEL ) ); _options_jmenu - .add( _show_default_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL ) ); + .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_INT ) ); + _options_jmenu + .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_NODE_BOXES_LABEL_EXT ) ); _options_jmenu .add( _taxonomy_colorize_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.TAXONOMY_COLORIZE_NODE_SHAPES_LABEL ) ); _options_jmenu.add( _cycle_node_shape_mi = new JMenuItem( MainFrame.CYCLE_NODE_SHAPE_LABEL ) ); @@ -659,7 +665,10 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { customizeCheckBoxMenuItem( _background_gradient_cbmi, getOptions().isBackgroundColorGradient() ); customizeCheckBoxMenuItem( _show_domain_labels, getOptions().isShowDomainLabels() ); customizeCheckBoxMenuItem( _abbreviate_scientific_names, getOptions().isAbbreviateScientificTaxonNames() ); - customizeCheckBoxMenuItem( _show_default_node_shapes_cbmi, getOptions().isShowDefaultNodeShapes() ); + customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions() + .isShowDefaultNodeShapesExternal() ); + customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions() + .isShowDefaultNodeShapesInternal() ); customizeCheckBoxMenuItem( _taxonomy_colorize_node_shapes_cbmi, getOptions().isTaxonomyColorizeNodeShapes() ); customizeJMenuItem( _cycle_node_shape_mi ); customizeJMenuItem( _cycle_node_fill_mi ); @@ -1017,8 +1026,10 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { && _abbreviate_scientific_names.isSelected() ); options.setColorLabelsSameAsParentBranch( ( _color_labels_same_as_parent_branch != null ) && _color_labels_same_as_parent_branch.isSelected() ); - options.setShowDefaultNodeShapes( ( _show_default_node_shapes_cbmi != null ) - && _show_default_node_shapes_cbmi.isSelected() ); + options.setShowDefaultNodeShapesInternal( ( _show_default_node_shapes_internal_cbmi != null ) + && _show_default_node_shapes_internal_cbmi.isSelected() ); + options.setShowDefaultNodeShapesExternal( ( _show_default_node_shapes_external_cbmi != null ) + && _show_default_node_shapes_external_cbmi.isSelected() ); options.setTaxonomyColorizeNodeShapes( ( _taxonomy_colorize_node_shapes_cbmi != null ) && _taxonomy_colorize_node_shapes_cbmi.isSelected() ); if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) { diff --git a/forester/java/src/org/forester/archaeopteryx/Configuration.java b/forester/java/src/org/forester/archaeopteryx/Configuration.java index 7b440a8..8fe8076 100644 --- a/forester/java/src/org/forester/archaeopteryx/Configuration.java +++ b/forester/java/src/org/forester/archaeopteryx/Configuration.java @@ -95,7 +95,8 @@ public final class Configuration { private boolean _show_domain_labels = true; private boolean _abbreviate_scientific_names = false; private boolean _color_labels_same_as_parent_branch = false; - private boolean _show_default_node_shapes = false; + private boolean _show_default_node_shapes_internal = false; + private boolean _show_default_node_shapes_external = false; private NodeShape _default_node_shape = NodeShape.CIRCLE; private NodeFill _default_node_fill = NodeFill.GRADIENT; private short _default_node_shape_size = Constants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT; @@ -661,8 +662,12 @@ public final class Configuration { return _show_branch_length_values; } - public boolean isShowDefaultNodeShapes() { - return _show_default_node_shapes; + public boolean isShowDefaultNodeShapesExternal() { + return _show_default_node_shapes_external; + } + + public boolean isShowDefaultNodeShapesInternal() { + return _show_default_node_shapes_internal; } public boolean isShowDomainLabels() { @@ -1292,7 +1297,18 @@ public final class Configuration { _domain_structure_base_color = Color.decode( ( String ) st.nextElement() ); } else if ( key.equals( "show_default_node_shapes" ) ) { - setShowDefaultNodeShapes( parseBoolean( ( ( String ) st.nextElement() ).trim() ) ); + ForesterUtil + .printWarningMessage( Constants.PRG_NAME, + "configuration key [show_default_node_shapes] is deprecated, use [show_default_node_shapes_internal] and [show_default_node_shapes_external] instead" ); + final boolean b = parseBoolean( ( ( String ) st.nextElement() ).trim() ); + setShowDefaultNodeShapesInternal( b ); + setShowDefaultNodeShapesExternal( b ); + } + else if ( key.equals( "show_default_node_shapes_internal" ) ) { + setShowDefaultNodeShapesInternal( parseBoolean( ( ( String ) st.nextElement() ).trim() ) ); + } + else if ( key.equals( "show_default_node_shapes_external" ) ) { + setShowDefaultNodeShapesExternal( parseBoolean( ( ( String ) st.nextElement() ).trim() ) ); } else if ( key.equals( "default_node_size" ) ) { final short i = parseShort( ( ( String ) st.nextElement() ).trim() ); @@ -1636,8 +1652,12 @@ public final class Configuration { _show_branch_length_values = show_branch_length_values; } - public void setShowDefaultNodeShapes( final boolean show_default_node_shapes ) { - _show_default_node_shapes = show_default_node_shapes; + public void setShowDefaultNodeShapesInternal( final boolean show_default_node_shapes_internal ) { + _show_default_node_shapes_internal = show_default_node_shapes_internal; + } + + public void setShowDefaultNodeShapesExternal( final boolean show_default_node_shapes_external ) { + _show_default_node_shapes_external = show_default_node_shapes_external; } public void setShowDomainLabels( final boolean show_domain_labels ) { diff --git a/forester/java/src/org/forester/archaeopteryx/Constants.java b/forester/java/src/org/forester/archaeopteryx/Constants.java index 48f7447..258e926 100644 --- a/forester/java/src/org/forester/archaeopteryx/Constants.java +++ b/forester/java/src/org/forester/archaeopteryx/Constants.java @@ -42,8 +42,8 @@ public final class Constants { public final static boolean __SYNTH_LF = false; // TODO remove me public final static boolean ALLOW_DDBJ_BLAST = false; public final static String PRG_NAME = "Archaeopteryx"; - final static String VERSION = "0.979"; - final static String PRG_DATE = "130104"; + final static String VERSION = "0.9800"; + final static String PRG_DATE = "130108"; final static String DEFAULT_CONFIGURATION_FILE_NAME = "_aptx_configuration_file"; final static String[] DEFAULT_FONT_CHOICES = { "Verdana", "Tahoma", "Arial", "Helvetica", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans" }; diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 733c04a..36e691c 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -101,7 +101,8 @@ public abstract class MainFrame extends JFrame implements ActionListener { static final String SCREEN_ANTIALIAS_LABEL = "Antialias"; static final String COLOR_LABELS_LABEL = "Colorize Labels Same as Parent Branch"; static final String BG_GRAD_LABEL = "Background Color Gradient"; - static final String DISPLAY_NODE_BOXES_LABEL = "Show Node Shapes"; + static final String DISPLAY_NODE_BOXES_LABEL_EXT = "Show External Node Shapes"; + static final String DISPLAY_NODE_BOXES_LABEL_INT = "Show Internal Node Shapes"; static final String SHOW_OVERVIEW_LABEL = "Show Overview"; static final String FONT_SIZE_MENU_LABEL = "Font Size"; static final String NONUNIFORM_CLADOGRAMS_LABEL = "External Node Sum Dependent Cladograms"; @@ -170,7 +171,8 @@ public abstract class MainFrame extends JFrame implements ActionListener { JCheckBoxMenuItem _color_labels_same_as_parent_branch; JMenuItem _overview_placment_mi; JMenuItem _choose_minimal_confidence_mi; - JCheckBoxMenuItem _show_default_node_shapes_cbmi; + JCheckBoxMenuItem _show_default_node_shapes_internal_cbmi; + JCheckBoxMenuItem _show_default_node_shapes_external_cbmi; JMenuItem _cycle_node_shape_mi; JMenuItem _cycle_node_fill_mi; JMenuItem _choose_node_size_mi; @@ -366,7 +368,10 @@ public abstract class MainFrame extends JFrame implements ActionListener { else if ( o == _color_labels_same_as_parent_branch ) { updateOptions( getOptions() ); } - else if ( o == _show_default_node_shapes_cbmi ) { + else if ( o == _show_default_node_shapes_internal_cbmi ) { + updateOptions( getOptions() ); + } + else if ( o == _show_default_node_shapes_external_cbmi ) { updateOptions( getOptions() ); } else if ( o == _taxonomy_colorize_node_shapes_cbmi ) { @@ -1061,8 +1066,10 @@ public abstract class MainFrame extends JFrame implements ActionListener { && _abbreviate_scientific_names.isSelected() ); options.setColorLabelsSameAsParentBranch( ( _color_labels_same_as_parent_branch != null ) && _color_labels_same_as_parent_branch.isSelected() ); - options.setShowDefaultNodeShapes( ( _show_default_node_shapes_cbmi != null ) - && _show_default_node_shapes_cbmi.isSelected() ); + options.setShowDefaultNodeShapesInternal( ( _show_default_node_shapes_internal_cbmi != null ) + && _show_default_node_shapes_internal_cbmi.isSelected() ); + options.setShowDefaultNodeShapesExternal( ( _show_default_node_shapes_external_cbmi != null ) + && _show_default_node_shapes_external_cbmi.isSelected() ); options.setTaxonomyColorizeNodeShapes( ( _taxonomy_colorize_node_shapes_cbmi != null ) && _taxonomy_colorize_node_shapes_cbmi.isSelected() ); if ( ( _non_lined_up_cladograms_rbmi != null ) && ( _non_lined_up_cladograms_rbmi.isSelected() ) ) { diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java index 871cbc6..1248fa5 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java @@ -191,7 +191,10 @@ public final class MainFrameApplet extends MainFrame { _options_jmenu .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( MainFrame.DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) ); _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( SHOW_CONF_STDDEV_LABEL ) ); - _options_jmenu.add( _show_default_node_shapes_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL ) ); + _options_jmenu + .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) ); + _options_jmenu + .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) ); _options_jmenu .add( _taxonomy_colorize_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.TAXONOMY_COLORIZE_NODE_SHAPES_LABEL ) ); _options_jmenu.add( _cycle_node_shape_mi = new JMenuItem( MainFrame.CYCLE_NODE_SHAPE_LABEL ) ); @@ -222,7 +225,10 @@ public final class MainFrameApplet extends MainFrame { customizeJMenuItem( _switch_colors_mi ); customizeJMenuItem( _choose_minimal_confidence_mi ); customizeJMenuItem( _overview_placment_mi ); - customizeCheckBoxMenuItem( _show_default_node_shapes_cbmi, getOptions().isShowDefaultNodeShapes() ); + customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions() + .isShowDefaultNodeShapesInternal() ); + customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions() + .isShowDefaultNodeShapesExternal() ); customizeCheckBoxMenuItem( _taxonomy_colorize_node_shapes_cbmi, getOptions().isTaxonomyColorizeNodeShapes() ); customizeJMenuItem( _cycle_node_shape_mi ); customizeJMenuItem( _cycle_node_fill_mi ); diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java index 3f3aa17..b50cbf2 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java @@ -962,7 +962,10 @@ public final class MainFrameApplication extends MainFrame { _options_jmenu .add( _show_branch_length_values_cbmi = new JCheckBoxMenuItem( DISPLAY_BRANCH_LENGTH_VALUES_LABEL ) ); _options_jmenu.add( _show_confidence_stddev_cbmi = new JCheckBoxMenuItem( SHOW_CONF_STDDEV_LABEL ) ); - _options_jmenu.add( _show_default_node_shapes_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL ) ); + _options_jmenu + .add( _show_default_node_shapes_internal_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_INT ) ); + _options_jmenu + .add( _show_default_node_shapes_external_cbmi = new JCheckBoxMenuItem( DISPLAY_NODE_BOXES_LABEL_EXT ) ); _options_jmenu .add( _taxonomy_colorize_node_shapes_cbmi = new JCheckBoxMenuItem( MainFrame.TAXONOMY_COLORIZE_NODE_SHAPES_LABEL ) ); _options_jmenu.add( _cycle_node_shape_mi = new JMenuItem( MainFrame.CYCLE_NODE_SHAPE_LABEL ) ); @@ -1033,7 +1036,10 @@ public final class MainFrameApplication extends MainFrame { customizeJMenuItem( _print_size_mi ); customizeJMenuItem( _choose_pdf_width_mi ); customizeJMenuItem( _overview_placment_mi ); - customizeCheckBoxMenuItem( _show_default_node_shapes_cbmi, getOptions().isShowDefaultNodeShapes() ); + customizeCheckBoxMenuItem( _show_default_node_shapes_external_cbmi, getOptions() + .isShowDefaultNodeShapesExternal() ); + customizeCheckBoxMenuItem( _show_default_node_shapes_internal_cbmi, getOptions() + .isShowDefaultNodeShapesInternal() ); customizeCheckBoxMenuItem( _taxonomy_colorize_node_shapes_cbmi, getOptions().isTaxonomyColorizeNodeShapes() ); customizeJMenuItem( _cycle_node_shape_mi ); customizeJMenuItem( _cycle_node_fill_mi ); diff --git a/forester/java/src/org/forester/archaeopteryx/Options.java b/forester/java/src/org/forester/archaeopteryx/Options.java index 43b8fec..69bd5b8 100644 --- a/forester/java/src/org/forester/archaeopteryx/Options.java +++ b/forester/java/src/org/forester/archaeopteryx/Options.java @@ -78,7 +78,8 @@ final public class Options { private NodeVisualization.NodeFill _default_node_fill; private short _default_node_shape_size; private boolean _taxonomy_colorize_node_shapes; - private boolean _show_default_node_shapes; + private boolean _show_default_node_shapes_internal; + private boolean _show_default_node_shapes_external; private boolean _show_confidence_stddev; private NH_CONVERSION_SUPPORT_VALUE_STYLE _nh_conversion_support_value_style; private NODE_DATA _ext_desc_data_to_return; @@ -87,6 +88,30 @@ final public class Options { init(); } + public NodeData.NODE_DATA getExtDescNodeDataToReturn() { + return _ext_desc_data_to_return; + } + + public final boolean isShowDomainLabels() { + return _show_domain_labels; + } + + public void setBackgroundColorGradient( final boolean background_color_gradient ) { + _background_color_gradient = background_color_gradient; + } + + public void setColorLabelsSameAsParentBranch( final boolean color_labels_same_as_parent_branch ) { + _color_labels_same_as_parent_branch = color_labels_same_as_parent_branch; + } + + public void setExtDescNodeDataToReturn( final NODE_DATA ext_desc_data_to_return ) { + _ext_desc_data_to_return = ext_desc_data_to_return; + } + + public void setShowDomainLabels( final boolean show_domain_labels ) { + _show_domain_labels = show_domain_labels; + } + final Font getBaseFont() { return _base_font; } @@ -111,6 +136,10 @@ final public class Options { 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; } @@ -147,69 +176,8 @@ final public class Options { return _scale_bar_length; } - final private void init() { - _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; - _antialias_screen = true; - _antialias_print = true; - _graphics_export_visible_only = false; - _editable = true; - _background_color_gradient = false; - _show_default_node_shapes = false; - if ( AptxUtil.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; - } - _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_case_sensitive = false; - _print_line_width = Constants.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; - _nh_parsing_replace_underscores = false; - _taxonomy_extraction = TAXONOMY_EXTRACTION.PFAM_STYLE_ONLY; - _cladogram_type = Constants.CLADOGRAM_TYPE_DEFAULT; - _show_domain_labels = true; - setAbbreviateScientificTaxonNames( false ); - _color_labels_same_as_parent_branch = false; - _show_confidence_stddev = true; - _nh_conversion_support_value_style = NH_CONVERSION_SUPPORT_VALUE_STYLE.NONE; - _ext_desc_data_to_return = NODE_DATA.UNKNOWN; - } - - boolean isShowConfidenceStddev() { - return _show_confidence_stddev; - } - - void setShowConfidenceStddev( final boolean show_confidence_stddev ) { - _show_confidence_stddev = show_confidence_stddev; - } - - NH_CONVERSION_SUPPORT_VALUE_STYLE getNhConversionSupportValueStyle() { - return _nh_conversion_support_value_style; - } - - void setNhConversionSupportValueStyle( final NH_CONVERSION_SUPPORT_VALUE_STYLE nh_conversion_support_value_style ) { - _nh_conversion_support_value_style = nh_conversion_support_value_style; + final TAXONOMY_EXTRACTION getTaxonomyExtraction() { + return _taxonomy_extraction; } final boolean isAbbreviateScientificTaxonNames() { @@ -240,10 +208,6 @@ final public class Options { return _editable; } - final TAXONOMY_EXTRACTION getTaxonomyExtraction() { - return _taxonomy_extraction; - } - final boolean isGraphicsExportUsingActualSize() { return _graphics_export_using_actual_size; } @@ -284,8 +248,16 @@ final public class Options { return _show_branch_length_values; } - public final boolean isShowDomainLabels() { - return _show_domain_labels; + boolean isShowConfidenceStddev() { + return _show_confidence_stddev; + } + + boolean isShowDefaultNodeShapesExternal() { + return _show_default_node_shapes_external; + } + + boolean isShowDefaultNodeShapesInternal() { + return _show_default_node_shapes_internal; } final boolean isShowOverview() { @@ -312,10 +284,6 @@ final public class Options { _antialias_screen = antialias_screen; } - public void setBackgroundColorGradient( final boolean background_color_gradient ) { - _background_color_gradient = background_color_gradient; - } - final void setBaseFont( final Font base_font ) { _base_font = base_font; } @@ -324,10 +292,6 @@ final public class Options { _cladogram_type = cladogram_type; } - 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 setDefaultNodeFill( final NodeFill default_node_fill ) { _default_node_fill = default_node_fill; } @@ -344,10 +308,6 @@ final public class Options { _editable = editable; } - final void setTaxonomyExtractio( final TAXONOMY_EXTRACTION taxonomy_extraction ) { - _taxonomy_extraction = taxonomy_extraction; - } - 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 ) { @@ -378,16 +338,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 ) { @@ -434,8 +390,16 @@ final public class Options { _show_branch_length_values = show_branch_length_values; } - public void setShowDomainLabels( final boolean show_domain_labels ) { - _show_domain_labels = show_domain_labels; + 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 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 ) { @@ -450,16 +414,66 @@ final public class Options { _taxonomy_colorize_node_shapes = taxonomy_colorize_node_shapes; } - final static Options createDefaultInstance() { - return new Options(); + final void setTaxonomyExtractio( final TAXONOMY_EXTRACTION taxonomy_extraction ) { + _taxonomy_extraction = taxonomy_extraction; + } + + final private void init() { + _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; + _antialias_screen = true; + _antialias_print = true; + _graphics_export_visible_only = false; + _editable = true; + _background_color_gradient = false; + _show_default_node_shapes_internal = false; + _show_default_node_shapes_external = false; + if ( AptxUtil.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; + } + _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_case_sensitive = false; + _print_line_width = Constants.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; + _nh_parsing_replace_underscores = false; + _taxonomy_extraction = TAXONOMY_EXTRACTION.PFAM_STYLE_ONLY; + _cladogram_type = Constants.CLADOGRAM_TYPE_DEFAULT; + _show_domain_labels = true; + setAbbreviateScientificTaxonNames( false ); + _color_labels_same_as_parent_branch = false; + _show_confidence_stddev = true; + _nh_conversion_support_value_style = NH_CONVERSION_SUPPORT_VALUE_STYLE.NONE; + _ext_desc_data_to_return = NODE_DATA.UNKNOWN; } - boolean isShowDefaultNodeShapes() { - return _show_default_node_shapes; + 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 setShowDefaultNodeShapes( final boolean show_default_node_shapes ) { - _show_default_node_shapes = show_default_node_shapes; + 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; } public final static Options createInstance( final Configuration configuration ) { @@ -519,7 +533,8 @@ final public class Options { instance.setDefaultNodeShapeSize( configuration.getDefaultNodeShapeSize() ); } instance.setTaxonomyColorizeNodeShapes( configuration.isTaxonomyColorizeNodeShapes() ); - instance.setShowDefaultNodeShapes( configuration.isShowDefaultNodeShapes() ); + instance.setShowDefaultNodeShapesInternal( configuration.isShowDefaultNodeShapesInternal() ); + instance.setShowDefaultNodeShapesExternal( configuration.isShowDefaultNodeShapesExternal() ); if ( configuration.getExtDescNodeDataToReturn() != null ) { instance.setExtDescNodeDataToReturn( configuration.getExtDescNodeDataToReturn() ); } @@ -527,6 +542,10 @@ final public class Options { return instance; } + final static Options createDefaultInstance() { + return new Options(); + } + public static enum CLADOGRAM_TYPE { NON_LINED_UP, EXT_NODE_SUM_DEP, TOTAL_NODE_SUM_DEP; } @@ -535,6 +554,10 @@ final public class Options { HORIZONTAL, RADIAL; } + public static enum PHYLOGENY_GRAPHICS_TYPE { + RECTANGULAR, TRIANGULAR, EURO_STYLE, ROUNDED, CONVEX, CURVED, UNROOTED, CIRCULAR; + } + static enum OVERVIEW_PLACEMENT_TYPE { UPPER_LEFT( "upper left" ), UPPER_RIGHT( "upper right" ), @@ -556,16 +579,4 @@ final public class Options { return toString().replaceAll( " ", "_" ); } } - - public static enum PHYLOGENY_GRAPHICS_TYPE { - RECTANGULAR, TRIANGULAR, EURO_STYLE, ROUNDED, CONVEX, CURVED, UNROOTED, CIRCULAR; - } - - public NodeData.NODE_DATA getExtDescNodeDataToReturn() { - return _ext_desc_data_to_return; - } - - public void setExtDescNodeDataToReturn( final NODE_DATA ext_desc_data_to_return ) { - _ext_desc_data_to_return = ext_desc_data_to_return; - } } diff --git a/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java b/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java index 44fa9af..a3c136d 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java +++ b/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java @@ -87,7 +87,7 @@ public final class TreeFontSet { } Font getLargeFont() { - return getLargeFontSystem(); + return _large_font; } private Font getLargeFontSystem() { diff --git a/forester/java/src/org/forester/archaeopteryx/TreePanel.java b/forester/java/src/org/forester/archaeopteryx/TreePanel.java index 6b26c29..4c1529f 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreePanel.java +++ b/forester/java/src/org/forester/archaeopteryx/TreePanel.java @@ -524,7 +524,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee initNodeData(); if ( recalc_longest_ext_node_info ) { calculateLongestExtNodeInfo(); - while ( ( getLongestExtNodeInfo() > y / 2 ) && ( getTreeFontSet().getLargeFont().getSize() > 2 ) ) { + while ( ( getLongestExtNodeInfo() > ( x * 0.67 ) ) && ( getTreeFontSet().getLargeFont().getSize() > 2 ) ) { getMainPanel().getTreeFontSet().decreaseFontSize(); calculateLongestExtNodeInfo(); } @@ -1838,7 +1838,8 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee } if ( getMainPanel().getOptions().isAntialiasScreen() ) { if ( ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) - && !getMainPanel().getOptions().isShowDefaultNodeShapes() + && !getMainPanel().getOptions().isShowDefaultNodeShapesInternal() + && !getMainPanel().getOptions().isShowDefaultNodeShapesExternal() && ( ( getControlPanel() != null ) && !getControlPanel().isShowDomainArchitectures() ) ) { _rendering_hints.put( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF ); } @@ -3811,7 +3812,9 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee } final int box_size = getOptions().getDefaultNodeShapeSize(); final int half_box_size = box_size / 2; - if ( getOptions().isShowDefaultNodeShapes() || ( getControlPanel().isEvents() && node.isHasAssignedEvent() ) ) { + if ( ( getOptions().isShowDefaultNodeShapesExternal() && node.isExternal() ) + || ( getOptions().isShowDefaultNodeShapesInternal() && node.isInternal() ) + || ( getControlPanel().isEvents() && node.isHasAssignedEvent() ) ) { if ( getOptions().getDefaultNodeShape() == NodeShape.CIRCLE ) { if ( getOptions().getDefaultNodeFill() == NodeFill.GRADIENT ) { drawOvalGradient( x - half_box_size, diff --git a/forester/java/src/org/forester/util/ForesterConstants.java b/forester/java/src/org/forester/util/ForesterConstants.java index e8ba376..c717966 100644 --- a/forester/java/src/org/forester/util/ForesterConstants.java +++ b/forester/java/src/org/forester/util/ForesterConstants.java @@ -27,8 +27,8 @@ package org.forester.util; public final class ForesterConstants { - public final static String FORESTER_VERSION = "1.015"; - public final static String FORESTER_DATE = "130104"; + public final static String FORESTER_VERSION = "1.016"; + public final static String FORESTER_DATE = "130108"; public final static String PHYLO_XML_VERSION = "1.10"; public final static String PHYLO_XML_LOCATION = "http://www.phyloxml.org"; public final static String PHYLO_XML_XSD = "phyloxml.xsd";