# HG changeset patch # User Felix Wolfsteller # Date 1340376252 0 # Node ID 2c86dd618c8433f66f8b7570c3998fde1074d1e8 # Parent d9fb3a178be415fd77dc4a8e1a8b96fef65c53b7 Prepare legend aggregation threshold setting. flys-artifacts/trunk@4756 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r d9fb3a178be4 -r 2c86dd618c84 flys-artifacts/src/main/java/de/intevation/flys/exports/LegendSection.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LegendSection.java Fri Jun 22 14:42:30 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LegendSection.java Fri Jun 22 14:44:12 2012 +0000 @@ -1,14 +1,15 @@ package de.intevation.flys.exports; - /** + * Settings regarding legend of chart. * @author Ingo Weinzierl */ public class LegendSection extends TypeSection { - public static final String VISIBILITY_ATTR = "visibility"; - public static final String FONTSIZE_ATTR = "font-size"; + public static final String VISIBILITY_ATTR = "visibility"; + public static final String FONTSIZE_ATTR = "font-size"; + public static final String AGGREGATION_ATTR = "aggregation-threshold"; public LegendSection() { @@ -16,6 +17,7 @@ } + /** Register font size attribute and value. */ public void setFontSize(int fontSize) { if (fontSize <= 0) { return; @@ -30,6 +32,16 @@ } + public Integer getAggregationThreshold() { + return getIntegerValue(AGGREGATION_ATTR); + } + + + public void setAggregationThreshold(int aggregationThreshold) { + setIntegerValue(AGGREGATION_ATTR, Math.abs(aggregationThreshold)); + } + + public void setVisibility(boolean visibility) { setBooleanValue(VISIBILITY_ATTR, visibility); }