comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java @ 3617:05deafdcbf39

sloppy logo placement property implementation. flys-artifacts/trunk@5284 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 28 Aug 2012 15:53:05 +0000
parents f84854eba0b3
children b7867c03760a
comparison
equal deleted inserted replaced
3616:d4751be54745 3617:05deafdcbf39
750 protected ChartSection buildChartSection() { 750 protected ChartSection buildChartSection() {
751 ChartSection chartSection = new ChartSection(); 751 ChartSection chartSection = new ChartSection();
752 chartSection.setTitle(getChartTitle()); 752 chartSection.setTitle(getChartTitle());
753 chartSection.setSubtitle(getChartSubtitle()); 753 chartSection.setSubtitle(getChartSubtitle());
754 chartSection.setDisplayGrid(isGridVisible()); 754 chartSection.setDisplayGrid(isGridVisible());
755 // TODO default to: "none"
756 chartSection.setDisplayLogo(showLogo()); 755 chartSection.setDisplayLogo(showLogo());
756 chartSection.setLogoPlacement(logoPlace());
757 return chartSection; 757 return chartSection;
758 } 758 }
759 759
760 760
761 /** 761 /**
1028 1028
1029 return true; 1029 return true;
1030 } 1030 }
1031 1031
1032 1032
1033 protected String logoPlace() {
1034 ChartSettings chartSettings = getChartSettings();
1035 if (chartSettings != null) {
1036 ChartSection cs = chartSettings.getChartSection();
1037 String place = cs.getLogoPlacement();
1038
1039 return place;
1040 }
1041 return "none";
1042 }
1043
1044
1033 /** Return the logo id from settings. */ 1045 /** Return the logo id from settings. */
1034 protected String showLogo(ChartSettings chartSettings) { 1046 protected String showLogo(ChartSettings chartSettings) {
1035 if (chartSettings != null) { 1047 if (chartSettings != null) {
1036 ChartSection cs = chartSettings.getChartSection(); 1048 ChartSection cs = chartSettings.getChartSection();
1037 String logo = cs.getDisplayLogo(); 1049 String logo = cs.getDisplayLogo();
1038 1050
1039 return logo; 1051 return logo;
1040 } 1052 }
1041 // TODO "none" instead of null? 1053 return "none";
1042 return null;
1043 } 1054 }
1044 1055
1045 1056
1046 /** 1057 /**
1047 * This method is used to determine if a logo should be added to the plot. 1058 * This method is used to determine if a logo should be added to the plot.

http://dive4elements.wald.intevation.org