Mercurial > dive4elements > river
changeset 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 | 5e505060a9bf |
children | 84a19de5f16a |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java flys-artifacts/src/main/resources/images/bfg_logo.gif flys-artifacts/src/main/resources/images/intevation.png |
diffstat | 5 files changed, 32 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Aug 29 15:26:50 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Aug 29 23:46:21 2012 +0000 @@ -1,3 +1,16 @@ +2012-08-30 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java: + Mention how/where to change predefined logos in comment. + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: + Mention how/where to change predefined logos in comment, + Use resource for images. + + * src/main/resources/images/bfg_logo.gif, + src/main/resources/images/intevation.png: + Added sample logos of intevation and bfg. + 2012-08-29 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java Wed Aug 29 15:26:50 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java Wed Aug 29 23:46:21 2012 +0000 @@ -267,6 +267,13 @@ 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. + */ if (logo.equals("Intevation")) { imageIcon = new ImageIcon("/home/felix/Downloads/intevation_logo_120.png"); }
--- 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;