Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java @ 3242:1dca41dba135
Move annotation code to base class ChartGenerator
flys-artifacts/trunk@4874 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 04 Jul 2012 22:28:44 +0000 |
parents | 112c3f0fc075 |
children | aeeb9192e395 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java Wed Jul 04 06:54:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java Wed Jul 04 22:28:44 2012 +0000 @@ -302,7 +302,9 @@ addAttribute(desc + "interpol", "interpolate"); addAttribute(desc, "outline"); - doQWDTextAnnotations(annoIdxMap, tsc, qwds, theme, visible); + if (visible) { + doQWDTextAnnotations(annoIdxMap, tsc, qwds, theme, visible); + } } @@ -312,10 +314,16 @@ protected void doQWDTextAnnotations(Map<Integer, int[]> annoIdxMap, TimeSeriesCollection tsc, QWD[] qwds, Document theme, boolean visible) { - if (!ThemeUtil.parseShowLineLabel(theme)) + logger.debug("doQWDTextAnnotation()"); + + if (!ThemeUtil.parseShowLineLabel(theme)) { + logger.debug("doQWDTextAnnotation: annotation not visible"); return; + } + List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); Set<Map.Entry<Integer, int[]>> entries = annoIdxMap.entrySet(); + for(Map.Entry<Integer, int[]> entry : entries) { QWD qwd = qwds[entry.getKey()]; int[] idxs = entry.getValue(); @@ -332,7 +340,7 @@ FLYSAnnotation flysAnno = new FLYSAnnotation(null, null, null, theme); flysAnno.setTextAnnotations(textAnnos); - addAnnotations(flysAnno, visible); + addAnnotations(flysAnno); }