Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LegendSection.java @ 2046:2ae0627f956e
Improved ChartSettings and depending classes to avoid a lot of casting.
flys-artifacts/trunk@3534 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Dec 2011 08:51:28 +0000 |
parents | 5c1e7c1e9e09 |
children | f97cf2e350c9 |
comparison
equal
deleted
inserted
replaced
2045:d13be39cfd1d | 2046:2ae0627f956e |
---|---|
32 attr.setValue(fontSize); | 32 attr.setValue(fontSize); |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 | 36 |
37 public Integer getFontSize() { | |
38 IntegerAttribute ia = (IntegerAttribute) getAttribute(FONTSIZE_ATTR); | |
39 return ia != null ? (Integer) ia.getValue() : null; | |
40 } | |
41 | |
42 | |
37 public void setVisibility(boolean visibility) { | 43 public void setVisibility(boolean visibility) { |
38 Attribute attr = getAttribute(VISIBILITY_ATTR); | 44 Attribute attr = getAttribute(VISIBILITY_ATTR); |
39 if (attr == null) { | 45 if (attr == null) { |
40 attr = new BooleanAttribute(VISIBILITY_ATTR, visibility, true); | 46 attr = new BooleanAttribute(VISIBILITY_ATTR, visibility, true); |
41 addAttribute(VISIBILITY_ATTR, attr); | 47 addAttribute(VISIBILITY_ATTR, attr); |
42 } | 48 } |
43 else { | 49 else { |
44 attr.setValue(visibility); | 50 attr.setValue(visibility); |
45 } | 51 } |
46 } | 52 } |
53 | |
54 | |
55 public Boolean getVisibility() { | |
56 BooleanAttribute ba = (BooleanAttribute) getAttribute(VISIBILITY_ATTR); | |
57 return ba != null ? (Boolean ) ba.getValue() : null; | |
58 } | |
47 } | 59 } |
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 60 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |