Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 2184:fc86fcfe503e
Only add one legend item for manual point themes.
flys-artifacts/trunk@3788 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 27 Jan 2012 11:19:16 +0000 |
parents | a79d5cd26083 |
children | 73490b828a90 |
comparison
equal
deleted
inserted
replaced
2183:a79d5cd26083 | 2184:fc86fcfe503e |
---|---|
1162 // Get Themeing information and add legend item. | 1162 // Get Themeing information and add legend item. |
1163 if (theme != null) { | 1163 if (theme != null) { |
1164 ThemeAccess themeAccess = new ThemeAccess(theme); | 1164 ThemeAccess themeAccess = new ThemeAccess(theme); |
1165 textStyle = themeAccess.parseTextStyle(); | 1165 textStyle = themeAccess.parseTextStyle(); |
1166 lineStyle = themeAccess.parseLineStyle(); | 1166 lineStyle = themeAccess.parseLineStyle(); |
1167 LegendItemCollection lic = new LegendItemCollection(); | 1167 if (fa.getLabel() != null) { |
1168 LegendItemCollection old = plot.getFixedLegendItems(); | 1168 LegendItemCollection lic = new LegendItemCollection(); |
1169 lic.add(createLegendItem(theme, fa.getLabel())); | 1169 LegendItemCollection old = plot.getFixedLegendItems(); |
1170 // (Re-)Add prior legend entries. | 1170 lic.add(createLegendItem(theme, fa.getLabel())); |
1171 if (old != null) { | 1171 // (Re-)Add prior legend entries. |
1172 old.addAll(lic); | 1172 if (old != null) { |
1173 old.addAll(lic); | |
1174 } | |
1175 else { | |
1176 old = lic; | |
1177 } | |
1178 plot.setFixedLegendItems(old); | |
1173 } | 1179 } |
1174 else { | |
1175 old = lic; | |
1176 } | |
1177 plot.setFixedLegendItems(old); | |
1178 } | 1180 } |
1179 | 1181 |
1180 // The 'Sticky' Annotations (at axis, with line and text). | 1182 // The 'Sticky' Annotations (at axis, with line and text). |
1181 for (StickyAxisAnnotation sta: fa.getAxisTextAnnotations()) { | 1183 for (StickyAxisAnnotation sta: fa.getAxisTextAnnotations()) { |
1182 addStickyAnnotation(sta, plot, area, lineStyle, textStyle); | 1184 addStickyAnnotation(sta, plot, area, lineStyle, textStyle); |