Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java @ 1993:85132c9edd64
Make reuse of the old CollectionAttribute during the describe() operation of FLYSArtifactCollection - remove the old facets only.
flys-artifacts/trunk@3430 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 16 Dec 2011 09:19:11 +0000 |
parents | 5c1e7c1e9e09 |
children | 3e703d134bbe |
line wrap: on
line source
package de.intevation.flys.exports; import de.intevation.artifactdatabase.state.DefaultSection; import de.intevation.artifactdatabase.state.DefaultSettings; import de.intevation.artifactdatabase.state.Section; /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class ChartSettings extends DefaultSettings { protected Section chartSection; protected Section legendSection; protected Section axesSection; public ChartSettings() { super(); axesSection = new DefaultSection("axes"); addSection(axesSection); } /** * Sets the chart section. Old chart sections are removed. * * @param chartSection A new Section that stores chart specific attributes. */ public void setChartSection(Section chartSection) { Section oldChartSection = getChartSection(); if (oldChartSection != null) { removeSection(oldChartSection); } this.chartSection = chartSection; addSection(chartSection); } /** * Returns the Section that stores chart specific attributes. * * @return the Section that stores chart specific attributes. */ public Section getChartSection() { return chartSection; } /** * 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. */ public void addAxisSection(Section axisSection) { if (axisSection != null) { axesSection.addSubsection(axisSection); } } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :