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