Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java @ 2046:2ae0627f956e
Improved ChartSettings and depending classes to avoid a lot of casting.
flys-artifacts/trunk@3534 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Dec 2011 08:51:28 +0000 |
parents | 3e703d134bbe |
children | c4e0e433f825 |
comparison
equal
deleted
inserted
replaced
2045:d13be39cfd1d | 2046:2ae0627f956e |
---|---|
19 */ | 19 */ |
20 public class ChartSettings extends DefaultSettings { | 20 public class ChartSettings extends DefaultSettings { |
21 | 21 |
22 private static final Logger logger = Logger.getLogger(ChartSettings.class); | 22 private static final Logger logger = Logger.getLogger(ChartSettings.class); |
23 | 23 |
24 protected Section chartSection; | 24 protected ChartSection chartSection; |
25 protected Section legendSection; | 25 protected LegendSection legendSection; |
26 protected Section axesSection; | 26 protected Section axesSection; |
27 | 27 |
28 | 28 |
29 public ChartSettings() { | 29 public ChartSettings() { |
30 super(); | 30 super(); |
31 | 31 |
37 /** | 37 /** |
38 * Sets the chart section. Old chart sections are removed. | 38 * Sets the chart section. Old chart sections are removed. |
39 * | 39 * |
40 * @param chartSection A new Section that stores chart specific attributes. | 40 * @param chartSection A new Section that stores chart specific attributes. |
41 */ | 41 */ |
42 public void setChartSection(Section chartSection) { | 42 public void setChartSection(ChartSection chartSection) { |
43 Section oldChartSection = getChartSection(); | 43 ChartSection oldChartSection = getChartSection(); |
44 | 44 |
45 if (oldChartSection != null) { | 45 if (oldChartSection != null) { |
46 removeSection(oldChartSection); | 46 removeSection(oldChartSection); |
47 } | 47 } |
48 | 48 |
54 /** | 54 /** |
55 * Returns the Section that stores chart specific attributes. | 55 * Returns the Section that stores chart specific attributes. |
56 * | 56 * |
57 * @return the Section that stores chart specific attributes. | 57 * @return the Section that stores chart specific attributes. |
58 */ | 58 */ |
59 public Section getChartSection() { | 59 public ChartSection getChartSection() { |
60 return chartSection; | 60 return chartSection; |
61 } | 61 } |
62 | 62 |
63 | 63 |
64 /** | 64 /** |
65 * Sets the legend section. Old legend sections are removed. | 65 * Sets the legend section. Old legend sections are removed. |
66 * | 66 * |
67 * @param legendSection A new Section that stores legend specific | 67 * @param legendSection A new Section that stores legend specific |
68 * attributes. | 68 * attributes. |
69 */ | 69 */ |
70 public void setLegendSection(Section legendSection) { | 70 public void setLegendSection(LegendSection legendSection) { |
71 Section oldLegendSection = getLegendSection(); | 71 LegendSection oldLegendSection = getLegendSection(); |
72 | 72 |
73 if (oldLegendSection != null) { | 73 if (oldLegendSection != null) { |
74 removeSection(oldLegendSection); | 74 removeSection(oldLegendSection); |
75 } | 75 } |
76 | 76 |
82 /** | 82 /** |
83 * Returns the Section that stores legend specific attributes. | 83 * Returns the Section that stores legend specific attributes. |
84 * | 84 * |
85 * @return the Section that stores legend specific attributes. | 85 * @return the Section that stores legend specific attributes. |
86 */ | 86 */ |
87 public Section getLegendSection() { | 87 public LegendSection getLegendSection() { |
88 return legendSection; | 88 return legendSection; |
89 } | 89 } |
90 | 90 |
91 | 91 |
92 /** | 92 /** |