Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/ExportSection.java @ 9123:1cc7653ca84f
Cleanup of ChartGenerator and ChartGenerator2 code. Put some of the copy/pasted code into a common abstraction.
author | gernotbelger |
---|---|
date | Tue, 05 Jun 2018 19:21:16 +0200 |
parents | af13ceeba52a |
children |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ExportSection.java Tue Jun 05 19:10:38 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ExportSection.java Tue Jun 05 19:21:16 2018 +0200 @@ -18,13 +18,15 @@ public static final String WIDTH_ATTR = "width"; public static final String HEIGHT_ATTR = "height"; + private static final String METADATA_ATTR = "chart_settings_export_metadata"; + public ExportSection() { super("export"); } - public void setWidth(int width) { + public void setWidth(final int width) { if (width <= 0) { return; } @@ -38,7 +40,7 @@ } - public void setHeight(int height) { + public void setHeight(final int height) { if (height <= 0) { return; } @@ -50,5 +52,12 @@ public Integer getHeight() { return getIntegerValue(HEIGHT_ATTR); } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : + + public void setMetadata(final boolean metadata) { + setBooleanValue(METADATA_ATTR, metadata); + } + + public boolean getMetadata() { + return getBooleanValue(METADATA_ATTR, true); + } +} \ No newline at end of file