added a close button
[jalview.git] / forester / java / src / org / forester / archaeopteryx / Options.java
1 // $Id:
2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
4 //
5 // Copyright (C) 2009 Christian M. Zmasek
6 // Copyright (C) 2009 Burnham Institute for Medical Research
7 // All rights reserved
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 //
23 // Contact: phylosoft @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
25
26 package org.forester.archaeopteryx;
27
28 import java.awt.Font;
29
30 import org.forester.io.parsers.nhx.NHXParser.TAXONOMY_EXTRACTION;
31 import org.forester.phylogeny.PhylogenyNode.NH_CONVERSION_SUPPORT_VALUE_STYLE;
32 import org.forester.phylogeny.data.NodeDataField;
33 import org.forester.phylogeny.data.NodeVisualData;
34 import org.forester.phylogeny.data.NodeVisualData.NodeFill;
35 import org.forester.phylogeny.data.NodeVisualData.NodeShape;
36 import org.forester.util.ForesterUtil;
37
38 /*
39  * This is to hold changeable options.
40  */
41 final public class Options {
42
43     public static enum CLADOGRAM_TYPE {
44         EXT_NODE_SUM_DEP, NON_LINED_UP, TOTAL_NODE_SUM_DEP;
45     }
46
47     public static enum NODE_LABEL_DIRECTION {
48         HORIZONTAL, RADIAL;
49     }
50
51     public static enum PHYLOGENY_GRAPHICS_TYPE {
52         CIRCULAR, CONVEX, CURVED, EURO_STYLE, RECTANGULAR, ROUNDED, TRIANGULAR, UNROOTED;
53     }
54
55     static enum OVERVIEW_PLACEMENT_TYPE {
56         LOWER_LEFT( "lower left" ),
57         LOWER_RIGHT( "lower right" ),
58         UPPER_LEFT( "upper left" ),
59         UPPER_RIGHT( "upper right" );
60
61         private final String _name;
62
63         private OVERVIEW_PLACEMENT_TYPE( final String name ) {
64             _name = name;
65         }
66
67         @Override
68         public String toString() {
69             return _name;
70         }
71
72         public String toTag() {
73             return toString().replaceAll( " ", "_" );
74         }
75     }
76     static final double                       MIN_CONFIDENCE_DEFAULT = 0.0;
77     private boolean                           _abbreviate_scientific_names;
78     private boolean                           _allow_errors_in_distance_to_parent;
79     private boolean                           _antialias_print;
80     private boolean                           _antialias_screen;
81     private boolean                           _background_color_gradient;
82     private Font                              _base_font;
83     private CLADOGRAM_TYPE                    _cladogram_type;
84     private boolean                           _color_by_taxonomic_group;
85     private boolean                           _color_labels_same_as_parent_branch;
86     private NodeVisualData.NodeFill           _default_node_fill;
87     private NodeVisualData.NodeShape          _default_node_shape;
88     private short                             _default_node_shape_size;
89     private boolean                           _editable;
90     private NodeDataField                     _ext_desc_data_to_return;
91     private boolean                           _graphics_export_using_actual_size;
92     private boolean                           _graphics_export_visible_only;
93     private boolean                           _internal_number_are_confidence_for_nh_parsing;
94     private boolean                           _inverse_search_result;
95     private boolean                           _match_whole_terms_only;
96     private boolean                           _search_with_regex;
97     private double                            _min_confidence_value;
98     private NH_CONVERSION_SUPPORT_VALUE_STYLE _nh_conversion_support_value_style;
99     private boolean                           _nh_parsing_replace_underscores;
100     private NODE_LABEL_DIRECTION              _node_label_direction;
101     private short                             _number_of_digits_after_comma_for_branch_length_values;
102     private short                             _number_of_digits_after_comma_for_confidence_values;
103     private OVERVIEW_PLACEMENT_TYPE           _ov_placement;
104     private PHYLOGENY_GRAPHICS_TYPE           _phylogeny_graphics_type;
105     private boolean                           _print_black_and_white;
106     private float                             _print_line_width;
107     private int                               _print_size_x;
108     private int                               _print_size_y;
109     private boolean                           _print_using_actual_size;
110     private double                            _scale_bar_length;
111     private boolean                           _search_case_sensitive;
112     private boolean                           _show_annotation_ref_source;
113     private boolean                           _show_confidence_stddev;
114     private boolean                           _show_default_node_shapes_for_marked_nodes;
115     private boolean                           _show_default_node_shapes_external;
116     private boolean                           _show_default_node_shapes_internal;
117     private boolean                           _show_domain_labels;
118     private boolean                           _show_overview;
119     private boolean                           _show_scale;
120     private TAXONOMY_EXTRACTION               _taxonomy_extraction;
121     private boolean                           _line_up_renderable_node_data;
122     private boolean                           _right_align_domains;
123     private boolean                           _color_all_found_nodes_when_coloring_subtree;
124
125     private Options() {
126         init();
127     }
128
129     public NodeDataField getExtDescNodeDataToReturn() {
130         return _ext_desc_data_to_return;
131     }
132
133     public boolean isAllowErrorsInDistanceToParent() {
134         return _allow_errors_in_distance_to_parent;
135     }
136
137     final public boolean isLineUpRendarableNodeData() {
138         return _line_up_renderable_node_data;
139     }
140
141     final public boolean isRightLineUpDomains() {
142         return _right_align_domains;
143     }
144
145     public final boolean isShowAnnotationRefSource() {
146         return _show_annotation_ref_source;
147     }
148
149     public final boolean isShowDomainLabels() {
150         return _show_domain_labels;
151     }
152
153     public final void setAllowErrorsInDistanceToParent( final boolean allow_errors_in_distance_to_parent ) {
154         _allow_errors_in_distance_to_parent = allow_errors_in_distance_to_parent;
155     }
156
157     public void setBackgroundColorGradient( final boolean background_color_gradient ) {
158         _background_color_gradient = background_color_gradient;
159     }
160
161     public void setColorLabelsSameAsParentBranch( final boolean color_labels_same_as_parent_branch ) {
162         _color_labels_same_as_parent_branch = color_labels_same_as_parent_branch;
163     }
164
165     public void setExtDescNodeDataToReturn( final NodeDataField ext_desc_data_to_return ) {
166         _ext_desc_data_to_return = ext_desc_data_to_return;
167     }
168
169     final public void setLineUpRendarableNodeData( final boolean line_up_renderable_node_data ) {
170         _line_up_renderable_node_data = line_up_renderable_node_data;
171     }
172
173     final public void setRightLineUpDomains( final boolean right_align_domains ) {
174         _right_align_domains = right_align_domains;
175     }
176
177     public final void setShowAnnotationRefSource( final boolean show_annotation_ref_source ) {
178         _show_annotation_ref_source = show_annotation_ref_source;
179     }
180
181     public void setShowDomainLabels( final boolean show_domain_labels ) {
182         _show_domain_labels = show_domain_labels;
183     }
184
185     final private void init() {
186         _default_node_shape = NodeShape.CIRCLE;
187         _default_node_fill = NodeFill.GRADIENT;
188         _default_node_shape_size = AptxConstants.DEFAULT_NODE_SHAPE_SIZE_DEFAULT;
189         _internal_number_are_confidence_for_nh_parsing = false;
190         _show_scale = false;
191         _antialias_screen = true;
192         _antialias_print = true;
193         _graphics_export_visible_only = false;
194         _editable = true;
195         _background_color_gradient = false;
196         _show_default_node_shapes_internal = false;
197         _show_default_node_shapes_external = false;
198         _show_default_node_shapes_for_marked_nodes = false;
199         _color_all_found_nodes_when_coloring_subtree = false;
200         if ( AptxUtil.isUsOrCanada() ) {
201             _print_size_x = AptxConstants.US_LETTER_SIZE_X;
202             _print_size_y = AptxConstants.US_LETTER_SIZE_Y;
203         }
204         else {
205             _print_size_x = AptxConstants.A4_SIZE_X;
206             _print_size_y = AptxConstants.A4_SIZE_Y;
207         }
208         _min_confidence_value = MIN_CONFIDENCE_DEFAULT;
209         _print_black_and_white = false;
210         _print_using_actual_size = true;
211         _graphics_export_using_actual_size = true;
212         _phylogeny_graphics_type = PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR;
213         _base_font = new Font( Configuration.getDefaultFontFamilyName(), Font.PLAIN, 10 );
214         _match_whole_terms_only = false;
215         _search_with_regex = false;
216         _search_case_sensitive = false;
217         _print_line_width = AptxConstants.PDF_LINE_WIDTH_DEFAULT;
218         _show_overview = true;
219         _ov_placement = OVERVIEW_PLACEMENT_TYPE.UPPER_LEFT;
220         _node_label_direction = NODE_LABEL_DIRECTION.HORIZONTAL;
221         _inverse_search_result = false;
222         _scale_bar_length = 0.0;
223         _number_of_digits_after_comma_for_branch_length_values = AptxConstants.NUMBER_OF_DIGITS_AFTER_COMMA_FOR_BRANCH_LENGTH_VALUES_DEFAULT;
224         _number_of_digits_after_comma_for_confidence_values = AptxConstants.NUMBER_OF_DIGITS_AFTER_COMMA_FOR_CONFIDENCE_VALUES_DEFAULT;
225         _nh_parsing_replace_underscores = false;
226         _taxonomy_extraction = TAXONOMY_EXTRACTION.NO;
227         _cladogram_type = AptxConstants.CLADOGRAM_TYPE_DEFAULT;
228         _show_domain_labels = true;
229         _show_annotation_ref_source = true;
230         setAbbreviateScientificTaxonNames( false );
231         _color_labels_same_as_parent_branch = false;
232         _show_confidence_stddev = false;
233         _nh_conversion_support_value_style = NH_CONVERSION_SUPPORT_VALUE_STYLE.NONE;
234         _ext_desc_data_to_return = NodeDataField.UNKNOWN;
235         _line_up_renderable_node_data = true;
236         _right_align_domains = false;
237     }
238
239     final private void setNumberOfDigitsAfterCommaForBranchLength( final short number_of_digits_after_comma_for_branch_length_values ) {
240         _number_of_digits_after_comma_for_branch_length_values = number_of_digits_after_comma_for_branch_length_values;
241     }
242
243     final private void setNumberOfDigitsAfterCommaForConfidenceValues( final short number_of_digits_after_comma_for_confidence_values ) {
244         _number_of_digits_after_comma_for_confidence_values = number_of_digits_after_comma_for_confidence_values;
245     }
246
247     final Font getBaseFont() {
248         return _base_font;
249     }
250
251     final CLADOGRAM_TYPE getCladogramType() {
252         return _cladogram_type;
253     }
254
255     final NodeFill getDefaultNodeFill() {
256         return _default_node_fill;
257     }
258
259     final NodeShape getDefaultNodeShape() {
260         return _default_node_shape;
261     }
262
263     final short getDefaultNodeShapeSize() {
264         return _default_node_shape_size;
265     }
266
267     final double getMinConfidenceValue() {
268         return _min_confidence_value;
269     }
270
271     NH_CONVERSION_SUPPORT_VALUE_STYLE getNhConversionSupportValueStyle() {
272         return _nh_conversion_support_value_style;
273     }
274
275     final NODE_LABEL_DIRECTION getNodeLabelDirection() {
276         return _node_label_direction;
277     }
278
279     final short getNumberOfDigitsAfterCommaForBranchLengthValues() {
280         return _number_of_digits_after_comma_for_branch_length_values;
281     }
282
283     final short getNumberOfDigitsAfterCommaForConfidenceValues() {
284         return _number_of_digits_after_comma_for_confidence_values;
285     }
286
287     final OVERVIEW_PLACEMENT_TYPE getOvPlacement() {
288         return _ov_placement;
289     }
290
291     final PHYLOGENY_GRAPHICS_TYPE getPhylogenyGraphicsType() {
292         return _phylogeny_graphics_type;
293     }
294
295     final float getPrintLineWidth() {
296         return _print_line_width;
297     }
298
299     final int getPrintSizeX() {
300         return _print_size_x;
301     }
302
303     final int getPrintSizeY() {
304         return _print_size_y;
305     }
306
307     final double getScaleBarLength() {
308         return _scale_bar_length;
309     }
310
311     final TAXONOMY_EXTRACTION getTaxonomyExtraction() {
312         return _taxonomy_extraction;
313     }
314
315     final boolean isAbbreviateScientificTaxonNames() {
316         return _abbreviate_scientific_names;
317     }
318
319     boolean isAllowMagnificationOfTaxonomyImages() {
320         return true;
321     }
322
323     final boolean isAntialiasPrint() {
324         return _antialias_print;
325     }
326
327     final boolean isAntialiasScreen() {
328         return _antialias_screen;
329     }
330
331     final boolean isBackgroundColorGradient() {
332         return _background_color_gradient;
333     }
334
335     final boolean isColorByTaxonomicGroup() {
336         return _color_by_taxonomic_group;
337     }
338
339     final boolean isColorLabelsSameAsParentBranch() {
340         return _color_labels_same_as_parent_branch;
341     }
342
343     final boolean isEditable() {
344         return _editable;
345     }
346
347     final boolean isGraphicsExportUsingActualSize() {
348         return _graphics_export_using_actual_size;
349     }
350
351     final boolean isGraphicsExportVisibleOnly() {
352         return _graphics_export_visible_only;
353     }
354
355     final boolean isInternalNumberAreConfidenceForNhParsing() {
356         return _internal_number_are_confidence_for_nh_parsing;
357     }
358
359     final boolean isInverseSearchResult() {
360         return _inverse_search_result;
361     }
362
363     final boolean isMatchWholeTermsOnly() {
364         return _match_whole_terms_only;
365     }
366
367     final boolean isPrintBlackAndWhite() {
368         return _print_black_and_white;
369     }
370
371     final boolean isPrintUsingActualSize() {
372         return _print_using_actual_size;
373     }
374
375     final boolean isReplaceUnderscoresInNhParsing() {
376         return _nh_parsing_replace_underscores;
377     }
378
379     final boolean isSearchCaseSensitive() {
380         return _search_case_sensitive;
381     }
382
383     final boolean isSearchWithRegex() {
384         return _search_with_regex;
385     }
386
387     boolean isShowConfidenceStddev() {
388         return _show_confidence_stddev;
389     }
390
391     boolean isShowDefaultNodeShapesExternal() {
392         return _show_default_node_shapes_external;
393     }
394
395     boolean isShowDefaultNodeShapesForMarkedNodes() {
396         return _show_default_node_shapes_for_marked_nodes;
397     }
398
399     boolean isShowDefaultNodeShapesInternal() {
400         return _show_default_node_shapes_internal;
401     }
402
403     final boolean isShowOverview() {
404         return _show_overview;
405     }
406
407     final boolean isShowScale() {
408         return _show_scale;
409     }
410
411     final void setAbbreviateScientificTaxonNames( final boolean abbreviate_scientific_names ) {
412         _abbreviate_scientific_names = abbreviate_scientific_names;
413     }
414
415     final void setAntialiasPrint( final boolean antialias_print ) {
416         _antialias_print = antialias_print;
417     }
418
419     final void setAntialiasScreen( final boolean antialias_screen ) {
420         _antialias_screen = antialias_screen;
421     }
422
423     final void setBaseFont( final Font base_font ) {
424         _base_font = base_font;
425     }
426
427     final void setCladogramType( final CLADOGRAM_TYPE cladogram_type ) {
428         _cladogram_type = cladogram_type;
429     }
430
431     final void setColorByTaxonomicGroup( final boolean color_by_taxonomic_group ) {
432         _color_by_taxonomic_group = color_by_taxonomic_group;
433     }
434
435     final void setDefaultNodeFill( final NodeFill default_node_fill ) {
436         _default_node_fill = default_node_fill;
437     }
438
439     final void setDefaultNodeShape( final NodeShape default_node_shape ) {
440         _default_node_shape = default_node_shape;
441     }
442
443     final void setDefaultNodeShapeSize( final short default_node_shape_size ) {
444         _default_node_shape_size = default_node_shape_size;
445     }
446
447     final void setEditable( final boolean editable ) {
448         _editable = editable;
449     }
450
451     final void setGraphicsExportUsingActualSize( final boolean graphics_export_using_actual_size ) {
452         _graphics_export_using_actual_size = graphics_export_using_actual_size;
453         if ( !graphics_export_using_actual_size ) {
454             setGraphicsExportVisibleOnly( false );
455         }
456     }
457
458     final void setGraphicsExportVisibleOnly( final boolean graphics_export_visible_only ) {
459         _graphics_export_visible_only = graphics_export_visible_only;
460         if ( graphics_export_visible_only ) {
461             setGraphicsExportUsingActualSize( true );
462         }
463     }
464
465     final void setInternalNumberAreConfidenceForNhParsing( final boolean internal_number_are_confidence_for_nh_parsing ) {
466         _internal_number_are_confidence_for_nh_parsing = internal_number_are_confidence_for_nh_parsing;
467     }
468
469     final void setInverseSearchResult( final boolean inverse_search_result ) {
470         _inverse_search_result = inverse_search_result;
471     }
472
473     final void setMatchWholeTermsOnly( final boolean search_whole_words_only ) {
474         _match_whole_terms_only = search_whole_words_only;
475     }
476
477     final void setMinConfidenceValue( final double min_confidence_value ) {
478         _min_confidence_value = min_confidence_value;
479     }
480
481     void setNhConversionSupportValueStyle( final NH_CONVERSION_SUPPORT_VALUE_STYLE nh_conversion_support_value_style ) {
482         _nh_conversion_support_value_style = nh_conversion_support_value_style;
483     }
484
485     final void setNodeLabelDirection( final NODE_LABEL_DIRECTION node_label_direction ) {
486         _node_label_direction = node_label_direction;
487     }
488
489     final void setOvPlacement( final OVERVIEW_PLACEMENT_TYPE ov_placement ) {
490         _ov_placement = ov_placement;
491     }
492
493     final void setPhylogenyGraphicsType( final PHYLOGENY_GRAPHICS_TYPE phylogeny_graphics_type ) {
494         _phylogeny_graphics_type = phylogeny_graphics_type;
495     }
496
497     final void setPrintBlackAndWhite( final boolean print_black_and_white ) {
498         _print_black_and_white = print_black_and_white;
499     }
500
501     final void setPrintLineWidth( final float print_line_width ) {
502         _print_line_width = print_line_width;
503     }
504
505     final void setPrintSizeX( final int print_size_x ) {
506         _print_size_x = print_size_x;
507     }
508
509     final void setPrintSizeY( final int print_size_y ) {
510         _print_size_y = print_size_y;
511     }
512
513     final void setPrintUsingActualSize( final boolean print_using_actual_size ) {
514         _print_using_actual_size = print_using_actual_size;
515     }
516
517     final void setReplaceUnderscoresInNhParsing( final boolean nh_parsing_replace_underscores ) {
518         _nh_parsing_replace_underscores = nh_parsing_replace_underscores;
519     }
520
521     final void setScaleBarLength( final double scale_bar_length ) {
522         _scale_bar_length = scale_bar_length;
523     }
524
525     final void setSearchCaseSensitive( final boolean search_case_sensitive ) {
526         _search_case_sensitive = search_case_sensitive;
527     }
528
529     final void setSearchWithRegex( final boolean search_with_regex ) {
530         _search_with_regex = search_with_regex;
531     }
532
533     void setShowConfidenceStddev( final boolean show_confidence_stddev ) {
534         _show_confidence_stddev = show_confidence_stddev;
535     }
536
537     void setShowDefaultNodeShapesExternal( final boolean show_default_node_shapes_external ) {
538         _show_default_node_shapes_external = show_default_node_shapes_external;
539     }
540
541     void setShowDefaultNodeShapesForMarkedNodes( final boolean show_default_node_shapes_for_marked_nodes ) {
542         _show_default_node_shapes_for_marked_nodes = show_default_node_shapes_for_marked_nodes;
543     }
544
545     void setShowDefaultNodeShapesInternal( final boolean show_default_node_shapes_internal ) {
546         _show_default_node_shapes_internal = show_default_node_shapes_internal;
547     }
548
549     final void setShowOverview( final boolean show_overview ) {
550         _show_overview = show_overview;
551     }
552
553     final void setShowScale( final boolean show_scale ) {
554         _show_scale = show_scale;
555     }
556
557     final void setTaxonomyExtraction( final TAXONOMY_EXTRACTION taxonomy_extraction ) {
558         _taxonomy_extraction = taxonomy_extraction;
559     }
560
561     public final static Options createInstance( final Configuration configuration ) {
562         final Options instance = createDefaultInstance();
563         if ( configuration != null ) {
564             instance.setAntialiasScreen( configuration.isAntialiasScreen() );
565             instance.setShowScale( configuration.isShowScale() );
566             instance.setShowOverview( configuration.isShowOverview() );
567             instance.setColorByTaxonomicGroup( configuration.isColorByTaxonomicGroup() );
568             instance.setCladogramType( configuration.getCladogramType() );
569             instance.setOvPlacement( configuration.getOvPlacement() );
570             instance.setPrintLineWidth( configuration.getPrintLineWidth() );
571             instance.setNodeLabelDirection( configuration.getNodeLabelDirection() );
572             instance.setBackgroundColorGradient( configuration.isBackgroundColorGradient() );
573             if ( configuration.getNumberOfDigitsAfterCommaForBranchLengthValues() >= 0 ) {
574                 instance.setNumberOfDigitsAfterCommaForBranchLength( configuration
575                         .getNumberOfDigitsAfterCommaForBranchLengthValues() );
576             }
577             if ( configuration.getNumberOfDigitsAfterCommaForConfidenceValues() >= 0 ) {
578                 instance.setNumberOfDigitsAfterCommaForConfidenceValues( configuration
579                         .getNumberOfDigitsAfterCommaForConfidenceValues() );
580             }
581             instance.setTaxonomyExtraction( configuration.getTaxonomyExtraction() );
582             instance.setReplaceUnderscoresInNhParsing( configuration.isReplaceUnderscoresInNhParsing() );
583             instance.setInternalNumberAreConfidenceForNhParsing( configuration
584                     .isInternalNumberAreConfidenceForNhParsing() );
585             instance.setEditable( configuration.isEditable() );
586             instance.setColorLabelsSameAsParentBranch( configuration.isColorLabelsSameAsParentBranch() );
587             instance.setShowDomainLabels( configuration.isShowDomainLabels() );
588             instance.setShowAnnotationRefSource( configuration.isShowAnnotationRefSource() );
589             instance.setAbbreviateScientificTaxonNames( configuration.isAbbreviateScientificTaxonNames() );
590             if ( configuration.getMinConfidenceValue() != MIN_CONFIDENCE_DEFAULT ) {
591                 instance.setMinConfidenceValue( configuration.getMinConfidenceValue() );
592             }
593             if ( configuration.getGraphicsExportX() > 0 ) {
594                 instance.setPrintSizeX( configuration.getGraphicsExportX() );
595             }
596             if ( configuration.getGraphicsExportY() > 0 ) {
597                 instance.setPrintSizeY( configuration.getGraphicsExportY() );
598             }
599             if ( configuration.getBaseFontSize() > 0 ) {
600                 instance.setBaseFont( instance.getBaseFont().deriveFont( ( float ) configuration.getBaseFontSize() ) );
601             }
602             if ( !ForesterUtil.isEmpty( configuration.getBaseFontFamilyName() ) ) {
603                 instance.setBaseFont( new Font( configuration.getBaseFontFamilyName(), Font.PLAIN, instance
604                         .getBaseFont().getSize() ) );
605             }
606             if ( configuration.getPhylogenyGraphicsType() != null ) {
607                 instance.setPhylogenyGraphicsType( configuration.getPhylogenyGraphicsType() );
608             }
609             if ( configuration.getDefaultNodeFill() != null ) {
610                 instance.setDefaultNodeFill( configuration.getDefaultNodeFill() );
611             }
612             if ( configuration.getDefaultNodeShape() != null ) {
613                 instance.setDefaultNodeShape( configuration.getDefaultNodeShape() );
614             }
615             if ( configuration.getDefaultNodeShapeSize() >= 0 ) {
616                 instance.setDefaultNodeShapeSize( configuration.getDefaultNodeShapeSize() );
617             }
618             instance.setShowDefaultNodeShapesInternal( configuration.isShowDefaultNodeShapesInternal() );
619             instance.setShowDefaultNodeShapesExternal( configuration.isShowDefaultNodeShapesExternal() );
620             instance.setShowDefaultNodeShapesForMarkedNodes( configuration.isShowDefaultNodeShapesForMarkedNodes() );
621             if ( configuration.getExtDescNodeDataToReturn() != null ) {
622                 instance.setExtDescNodeDataToReturn( configuration.getExtDescNodeDataToReturn() );
623             }
624             instance.setRightLineUpDomains( configuration.isRightLineUpDomains() );
625             instance.setLineUpRendarableNodeData( configuration.isLineUpRendarableNodeData() );
626             instance.setAllowErrorsInDistanceToParent( false );
627         }
628         return instance;
629     }
630
631     final static Options createDefaultInstance() {
632         return new Options();
633     }
634
635     final boolean isColorAllFoundNodesWhenColoringSubtree() {
636         return _color_all_found_nodes_when_coloring_subtree;
637     }
638     
639     final void setColorAllFoundNodesWhenColoringSubtree( final boolean color_all_found_nodes_when_coloring_subtree ) {
640         _color_all_found_nodes_when_coloring_subtree = color_all_found_nodes_when_coloring_subtree;
641     }
642 }