comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java @ 3615:f84854eba0b3

Preparations for logo inclusion in charts. flys-artifacts/trunk@5278 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 28 Aug 2012 12:47:11 +0000
parents dd6e25980c91
children 05deafdcbf39
comparison
equal deleted inserted replaced
3614:68beaa827751 3615:f84854eba0b3
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 return chartSection; 757 return chartSection;
756 } 758 }
757 759
758 760
759 /** 761 /**
1023 if (chartSettings != null) { 1025 if (chartSettings != null) {
1024 return isLegendVisible(chartSettings); 1026 return isLegendVisible(chartSettings);
1025 } 1027 }
1026 1028
1027 return true; 1029 return true;
1030 }
1031
1032
1033 /** Return the logo id from settings. */
1034 protected String showLogo(ChartSettings chartSettings) {
1035 if (chartSettings != null) {
1036 ChartSection cs = chartSettings.getChartSection();
1037 String logo = cs.getDisplayLogo();
1038
1039 return logo;
1040 }
1041 // TODO "none" instead of null?
1042 return null;
1043 }
1044
1045
1046 /**
1047 * This method is used to determine if a logo should be added to the plot.
1048 *
1049 * @return logo name (null if none).
1050 */
1051 protected String showLogo() {
1052 ChartSettings chartSettings = getChartSettings();
1053 return showLogo(chartSettings);
1028 } 1054 }
1029 1055
1030 1056
1031 /** 1057 /**
1032 * This method is used to determine the font size of the chart's legend. If 1058 * This method is used to determine the font size of the chart's legend. If

http://dive4elements.wald.intevation.org