diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 3623:119b8ba2b77f

Include logos in resources. flys-artifacts/trunk@5300 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 29 Aug 2012 23:46:21 +0000
parents 6772e9f9b65f
children ebfce31c7eec
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Wed Aug 29 15:26:50 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Wed Aug 29 23:46:21 2012 +0000
@@ -284,12 +284,22 @@
         if (logo.equals("none")) {
             return;
         }
+        /*
+         If you want to add images, remember to change code in these places:
+         flys-artifacts:
+         XYChartGenerator.java
+         Timeseries*Generator.java and
+         in the flys-client projects Chart*Propert*Editor.java.
+         */
+        java.net.URL imageURL;
         if (logo.equals("Intevation")) {
-            imageIcon = new ImageIcon("/home/felix/Downloads/intevation_logo_120.png");
+            imageURL = XYChartGenerator.class.getResource("/images/intevation.png");
         }
         else { // TODO else if ...
-            imageIcon = new ImageIcon("/home/felix/Downloads/bfg_logo.gif");
+            imageURL = XYChartGenerator.class.getResource("/images/bfg_logo.gif");
         }
+        imageIcon = new ImageIcon(imageURL);
+
 
         double xPos = 0d, yPos = 0d;
 

http://dive4elements.wald.intevation.org