Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java @ 1990:5c1e7c1e9e09
Improved the ChartSettings returned by charts - it now contains a legend specific section.
flys-artifacts/trunk@3426 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 15 Dec 2011 15:58:56 +0000 |
parents | 3632150dbe0b |
children | 3e703d134bbe |
comparison
equal
deleted
inserted
replaced
1989:156304542edf | 1990:5c1e7c1e9e09 |
---|---|
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
10 */ | 10 */ |
11 public class ChartSettings extends DefaultSettings { | 11 public class ChartSettings extends DefaultSettings { |
12 | 12 |
13 protected Section chartSection; | 13 protected Section chartSection; |
14 protected Section legendSection; | |
14 protected Section axesSection; | 15 protected Section axesSection; |
15 | 16 |
16 | 17 |
17 public ChartSettings() { | 18 public ChartSettings() { |
18 super(); | 19 super(); |
48 return chartSection; | 49 return chartSection; |
49 } | 50 } |
50 | 51 |
51 | 52 |
52 /** | 53 /** |
54 * Sets the legend section. Old legend sections are removed. | |
55 * | |
56 * @param legendSection A new Section that stores legend specific | |
57 * attributes. | |
58 */ | |
59 public void setLegendSection(Section legendSection) { | |
60 Section oldLegendSection = getLegendSection(); | |
61 | |
62 if (oldLegendSection != null) { | |
63 removeSection(oldLegendSection); | |
64 } | |
65 | |
66 this.legendSection = legendSection; | |
67 addSection(legendSection); | |
68 } | |
69 | |
70 | |
71 /** | |
72 * Returns the Section that stores legend specific attributes. | |
73 * | |
74 * @return the Section that stores legend specific attributes. | |
75 */ | |
76 public Section getLegendSection() { | |
77 return legendSection; | |
78 } | |
79 | |
80 | |
81 /** | |
53 * Adds a Section for a new axis of the chart. | 82 * Adds a Section for a new axis of the chart. |
54 * | 83 * |
55 * @param axisSection The Section specific for a chart axis. | 84 * @param axisSection The Section specific for a chart axis. |
56 */ | 85 */ |
57 public void addAxisSection(Section axisSection) { | 86 public void addAxisSection(Section axisSection) { |