comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LegendSection.java @ 3148:2c86dd618c84

Prepare legend aggregation threshold setting. flys-artifacts/trunk@4756 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 22 Jun 2012 14:44:12 +0000
parents ca8997aa683e
children
comparison
equal deleted inserted replaced
3147:d9fb3a178be4 3148:2c86dd618c84
1 package de.intevation.flys.exports; 1 package de.intevation.flys.exports;
2 2
3 3
4
5 /** 4 /**
5 * Settings regarding legend of chart.
6 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 6 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
7 */ 7 */
8 public class LegendSection extends TypeSection { 8 public class LegendSection extends TypeSection {
9 9
10 public static final String VISIBILITY_ATTR = "visibility"; 10 public static final String VISIBILITY_ATTR = "visibility";
11 public static final String FONTSIZE_ATTR = "font-size"; 11 public static final String FONTSIZE_ATTR = "font-size";
12 public static final String AGGREGATION_ATTR = "aggregation-threshold";
12 13
13 14
14 public LegendSection() { 15 public LegendSection() {
15 super("legend"); 16 super("legend");
16 } 17 }
17 18
18 19
20 /** Register font size attribute and value. */
19 public void setFontSize(int fontSize) { 21 public void setFontSize(int fontSize) {
20 if (fontSize <= 0) { 22 if (fontSize <= 0) {
21 return; 23 return;
22 } 24 }
23 25
28 public Integer getFontSize() { 30 public Integer getFontSize() {
29 return getIntegerValue(FONTSIZE_ATTR); 31 return getIntegerValue(FONTSIZE_ATTR);
30 } 32 }
31 33
32 34
35 public Integer getAggregationThreshold() {
36 return getIntegerValue(AGGREGATION_ATTR);
37 }
38
39
40 public void setAggregationThreshold(int aggregationThreshold) {
41 setIntegerValue(AGGREGATION_ATTR, Math.abs(aggregationThreshold));
42 }
43
44
33 public void setVisibility(boolean visibility) { 45 public void setVisibility(boolean visibility) {
34 setBooleanValue(VISIBILITY_ATTR, visibility); 46 setBooleanValue(VISIBILITY_ATTR, visibility);
35 } 47 }
36 48
37 49

http://dive4elements.wald.intevation.org