annotate artifacts/src/main/java/org/dive4elements/river/exports/ChartSection.java @ 9801:1d7a72a50183 3.2.x tip

Assume Compose V2, consistently
author Tom Gottfried <tom@intevation.de>
date Thu, 23 Nov 2023 10:14:13 +0100
parents 0a5239a1e46e
children
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3618
diff changeset
9 package org.dive4elements.river.exports;
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
11 import org.apache.logging.log4j.Logger;
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
12 import org.apache.logging.log4j.LogManager;
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 /**
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 */
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
18 public class ChartSection extends TypeSection {
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
20 private static Logger log = LogManager.getLogger(ChartSection.class);
3617
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
21
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
22 public static final String TITLE_ATTR = "title";
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
23 public static final String SUBTITLE_ATTR = "subtitle";
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
24 public static final String DISPLAYGRID_ATTR = "display-grid";
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
25 public static final String DISPLAYLOGO_ATTR = "display-logo";
3618
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
26 public static final String LOGOPLACEMENTH_ATTR = "logo-placeh";
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
27 public static final String LOGOPLACEMENTV_ATTR = "logo-placev";
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 public ChartSection() {
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 super("chart");
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 }
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 public void setTitle(String title) {
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
36 setStringValue(TITLE_ATTR, title);
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 }
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39
2046
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
40 public String getTitle() {
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
41 return getStringValue(TITLE_ATTR);
2046
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
42 }
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
43
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
44
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 public void setSubtitle(String subtitle) {
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
46 setStringValue(SUBTITLE_ATTR, subtitle);
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 }
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49
2046
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
50 public String getSubtitle() {
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
51 return getStringValue(SUBTITLE_ATTR);
2046
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
52 }
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
53
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
54
3617
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
55 /** Get Property-value for display-logo property. */
3615
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
56 public String getDisplayLogo() {
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
57 return getStringValue(DISPLAYLOGO_ATTR);
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
58 }
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
59
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
60
3617
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
61 /** Set Property-value for display-logo property. */
3615
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
62 public void setDisplayLogo(String logo) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
63 log.debug("Setting Display logo string.");
3615
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
64 setChoiceStringValue(DISPLAYLOGO_ATTR, logo, "logo");
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
65 }
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
66
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
67
3618
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
68 /** Get Property-value for horizontal logo-placement property. */
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
69 public String getLogoHPlacement() {
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
70 return getStringValue(LOGOPLACEMENTH_ATTR);
3617
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
71 }
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
72
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
73
3618
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
74 /** Set Property-value for horizontal logo-placement property. */
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
75 public void setLogoHPlacement(String place) {
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
76 setChoiceStringValue(LOGOPLACEMENTH_ATTR, place, "placeh");
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
77 }
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
78
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
79
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
80 /** Get Property-value for vertical logo-placement property. */
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
81 public String getLogoVPlacement() {
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
82 return getStringValue(LOGOPLACEMENTV_ATTR);
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
83 }
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
84
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
85
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
86 /** Set Property-value for vertical logo-placement property. */
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
87 public void setLogoVPlacement(String place) {
b7867c03760a Split logo placement property in two (vertical/horizontal).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3617
diff changeset
88 setChoiceStringValue(LOGOPLACEMENTV_ATTR, place, "placev");
3617
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
89 }
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
90
05deafdcbf39 sloppy logo placement property implementation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3615
diff changeset
91
3615
f84854eba0b3 Preparations for logo inclusion in charts.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2064
diff changeset
92 public void setDisplayGrid(boolean displayGrid) {
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
93 setBooleanValue(DISPLAYGRID_ATTR, displayGrid);
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94 }
2046
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
95
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
96
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
97 public Boolean getDisplayGrid() {
2058
f97cf2e350c9 Some refactoring done: all Sections subclass TypeSection now to be able to use the convinience methods for string, integer, double and boolean attributes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2046
diff changeset
98 return getBooleanValue(DISPLAYGRID_ATTR);
2046
2ae0627f956e Improved ChartSettings and depending classes to avoid a lot of casting.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1986
diff changeset
99 }
1986
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 }
3632150dbe0b Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org