comparison artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java @ 6908:819481cc9195

Artifacts: ThemeDocument. The bloody part: Removal of the XPaths. Now the theme XML document is scanned once(!) at construction time for field values and the resulting key/value pairs are store in a map.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 23 Aug 2013 11:07:11 +0200
parents 7a9cbb3a3d5a
children 557cb3a3d772
comparison
equal deleted inserted replaced
6907:dbad1f442f3e 6908:819481cc9195
1833 * @return a new LegendItem instance. 1833 * @return a new LegendItem instance.
1834 */ 1834 */
1835 public LegendItem createLegendItem(ThemeDocument theme, String name) { 1835 public LegendItem createLegendItem(ThemeDocument theme, String name) {
1836 // OPTIMIZE Pass font, parsed Theme items. 1836 // OPTIMIZE Pass font, parsed Theme items.
1837 1837
1838 Color color = theme.parseComplexLineColorField(); 1838 Color color = theme.parseLineColorField();
1839 if (color == null) {
1840 color = Color.BLACK;
1841 }
1842
1839 LegendItem legendItem = new LegendItem(name, color); 1843 LegendItem legendItem = new LegendItem(name, color);
1840 1844
1841 legendItem.setLabelFont(createLegendLabelFont()); 1845 legendItem.setLabelFont(createLegendLabelFont());
1842 return legendItem; 1846 return legendItem;
1843 } 1847 }

http://dive4elements.wald.intevation.org