Commit 794cbe77 authored by pfreon's avatar pfreon
Browse files

Correction of a recent bug in HTML report

Correction of a recent bug in the HTML report (duplication of graphs on residual CPUE due to a bug in the name of the .jpg file after modification of the titles, now on two lines).
parent 90be28b5
......@@ -4,7 +4,6 @@
* et celui des questions/réponses en lien avec WriteHtml.java.
*/
package fr.ird.climprod;
import javax.swing.*;
import java.awt.*;
import java.util.Hashtable;
......@@ -30,7 +29,7 @@ public class RapportHtml extends JDialog {
choice = 0;
folderList = null;
facts = currentFacts;
System.out.println("RapportHtml Ligne 33 FlagNewHtmlFolder = " + Global.FlagNewHtmlFolder);
//System.out.println("RapportHtml Ligne 33 FlagNewHtmlFolder = " + Global.FlagNewHtmlFolder);
fileSep = System.getProperty("file.separator");
if (fileSep.equals("/")) {
fileSep = "//";
......@@ -189,7 +188,7 @@ System.out.println("RapportHtml Ligne 33 FlagNewHtmlFolder = " + Global.FlagNewH
folderName = "defaultFolder";
}
Global.FlagNewHtmlFolder = true;
System.out.println("Ligne 194 FlagNewHtmlFolder = " + Global.FlagNewHtmlFolder);
//System.out.println("Ligne 194 FlagNewHtmlFolder = " + Global.FlagNewHtmlFolder);
String folderPath = path + fileSep + folderName;
File fPath = new File(folderPath);
if (!fPath.exists()) {
......@@ -735,10 +734,9 @@ System.out.println("Ligne 194 FlagNewHtmlFolder = " + Global.FlagNewHtmlFolder)
}
for (int i = 0; i < nbCase; i++) { // Images graphiques
if (p[i] != null){
String titreCorr = p[i].getTitreGraphique();
String titreCorr = p[i].getTitreGraphique();
int cc = titreCorr.length();
if (cc > 45) titreCorr = titreCorr.substring(0,(titreCorr.indexOf("R2")+16)); // In order to cut the part of the title of the R2 jackknife plot showing ">" or "<" in the title of the file.
if (cc > 39 && cc < 45) titreCorr = titreCorr.substring(0,(titreCorr.indexOf("%")+12)); // In order to cut the part of the title of the coefficient jackknife plot showing ">" or "<" in the title of the file.
if (titreCorr.indexOf("%") > 0) titreCorr = titreCorr.substring(0,(titreCorr.indexOf("%")+12)); // In order to shorten the title of the coefficient jackknife plot file.
titre[i] = titreCorr + ".jpg"; // Noms fichiers image jpg
//System.out.println("RapportHtml.java ligne 770, titre [i]: " + titre[i] + " i = " + i);
makeImage(folderpath + fileSep + titre[i], p[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment