comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LegendSection.java @ 3318:dbe2f85bf160

merged flys-artifacts/2.8
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:35 +0200
parents 2c86dd618c84
children
comparison
equal deleted inserted replaced
2987:98c7a46ec5ae 3318:dbe2f85bf160
1 package de.intevation.flys.exports;
2
3
4 /**
5 * Settings regarding legend of chart.
6 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
7 */
8 public class LegendSection extends TypeSection {
9
10 public static final String VISIBILITY_ATTR = "visibility";
11 public static final String FONTSIZE_ATTR = "font-size";
12 public static final String AGGREGATION_ATTR = "aggregation-threshold";
13
14
15 public LegendSection() {
16 super("legend");
17 }
18
19
20 /** Register font size attribute and value. */
21 public void setFontSize(int fontSize) {
22 if (fontSize <= 0) {
23 return;
24 }
25
26 setIntegerValue(FONTSIZE_ATTR, fontSize);
27 }
28
29
30 public Integer getFontSize() {
31 return getIntegerValue(FONTSIZE_ATTR);
32 }
33
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
45 public void setVisibility(boolean visibility) {
46 setBooleanValue(VISIBILITY_ATTR, visibility);
47 }
48
49
50 public Boolean getVisibility() {
51 return getBooleanValue(VISIBILITY_ATTR);
52 }
53 }
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org