Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/ExportSection.java @ 2056:76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
flys-artifacts/trunk@3547 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 27 Dec 2011 10:12:14 +0000 |
parents | |
children | ca8997aa683e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ExportSection.java Tue Dec 27 10:12:14 2011 +0000 @@ -0,0 +1,48 @@ +package de.intevation.flys.exports; + +import de.intevation.artifactdatabase.state.Attribute; +import de.intevation.artifactdatabase.state.DefaultSection; + + +/** + * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> + */ +public class ExportSection extends TypeSection { + + public static final String WIDTH_ATTR = "width"; + public static final String HEIGHT_ATTR = "height"; + + + public ExportSection() { + super("export"); + } + + + public void setWidth(int width) { + if (width <= 0) { + return; + } + + setIntegerValue(WIDTH_ATTR, width); + } + + + public Integer getWidth() { + return getIntegerValue(WIDTH_ATTR); + } + + + public void setHeight(int height) { + if (height <= 0) { + return; + } + + setIntegerValue(HEIGHT_ATTR, height); + } + + + public Integer getHeight() { + return getIntegerValue(HEIGHT_ATTR); + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :