From: mka Date: Thu, 14 Mar 2013 13:58:56 +0000 (+0000) Subject: Title of the chart is set from input file. X-Git-Tag: Root_Delivery2_2013_04_22~95 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=95f57150b7efa3a412d32bfb07a1ae0149099eab;p=tools%2Fsiman.git Title of the chart is set from input file. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java index a34f6d5..8db0d6c 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java @@ -1187,6 +1187,7 @@ public class StudyServiceImpl implements StudyService { String axis1Name = ""; String axis2Name = ""; + String chartTitle = ""; String resultPath = ""; XYSeriesCollection dataset = new XYSeriesCollection(); @@ -1201,12 +1202,17 @@ public class StudyServiceImpl implements StudyService { resultPath = pathToFile.substring(0, pathToFile.indexOf("vault")) + "downloads" + File.separator + userName + File.separator + "ComparisonResult.pdf"; - XYSeries series = new XYSeries("Study: " + docDTO.getStudyTitle() + " Scenario: " + docDTO.getScenarioTitle() + "Document: " + docDTO.getDocumentTitle()); + XYSeries series = new XYSeries("Study: " + docDTO.getStudyTitle() + " Scenario: " + docDTO.getScenarioTitle() + " Document: " + docDTO.getDocumentTitle()); //read the file and get points information. try { Scanner input = new Scanner(compDocFile); + //get the title of the chart. + if (input.hasNext()) { + chartTitle = input.nextLine(); + } + //get the name of the axis. if (input.hasNext()) { String[] tokens = input.nextLine().split(","); @@ -1254,7 +1260,7 @@ public class StudyServiceImpl implements StudyService { } //for JFreeChart chart = ChartFactory.createXYLineChart( - "Comparision of Studies Results", // Title + chartTitle, // Title axis1Name, // x-axis Label axis2Name, // y-axis Label dataset, // Dataset