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