Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java Thu Dec 15 12:05:06 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java Thu Dec 15 15:58:56 2011 +0000 @@ -11,6 +11,7 @@ public class ChartSettings extends DefaultSettings { protected Section chartSection; + protected Section legendSection; protected Section axesSection; @@ -50,6 +51,34 @@ /** + * Sets the legend section. Old legend sections are removed. + * + * @param legendSection A new Section that stores legend specific + * attributes. + */ + public void setLegendSection(Section legendSection) { + Section oldLegendSection = getLegendSection(); + + if (oldLegendSection != null) { + removeSection(oldLegendSection); + } + + this.legendSection = legendSection; + addSection(legendSection); + } + + + /** + * Returns the Section that stores legend specific attributes. + * + * @return the Section that stores legend specific attributes. + */ + public Section getLegendSection() { + return legendSection; + } + + + /** * Adds a Section for a new axis of the chart. * * @param axisSection The Section specific for a chart axis.