Skip to content
Snippets Groups Projects
Commit 5273ff2c authored by Locatelli's avatar Locatelli
Browse files

ressource file wasn't working, replace by code constant

parent ed51416a
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ill.ics</groupId>
<artifactId>ploty</artifactId>
<version>3.1.5-SNAPSHOT</version>
<version>3.1.6</version>
<name>Ploty</name>
<scm>
<connection>scm:svn:http://forge.ill.fr/svn/nomad/ill/Ploty/trunk</connection>
......
......@@ -17,7 +17,7 @@ public class ConfigConstants {
public final static String PLOT_WEB_DIR = PLOT_SCREENSHOTS_DIR + FILE_SEPARATOR + "web" + FILE_SEPARATOR;
public final static String PLOT_LOG_DIR = PLOT_SCREENSHOTS_DIR + FILE_SEPARATOR + "log" + FILE_SEPARATOR;
public final static String SHARP = "#";
public final static String RENDERING_CONTROLLERS = "offScreenRenderingPlotDataControllers.txt";
//public final static String RENDERING_CONTROLLERS = "offScreenRenderingPlotDataControllers.txt";
public final static String PROPERTY = "PROPERTY=";
......
......@@ -415,11 +415,13 @@ public class Renderer {
// Optimization
if (plotData.hasOptimizationFit()) {
Array dataYFitArray = plotData.getOptimizationFitArray();
gl.glColor3f(0xff / 255f, 0xa8 / 255f, 0x00 / 255f);
//NOTE: waiting to be discussed. Make wider the line drawn in offscreen images
// OpenglUtilities.setLineWidth(gl, 1.125f);
OpenglUtilities.drawCurve(gl, dataXArray, dataYFitArray);
// OpenglUtilities.setLineWidth(gl, 1f); //default width is one
if (dataYFitArray != null) {
gl.glColor3f(0xff / 255f, 0xa8 / 255f, 0x00 / 255f);
//NOTE: waiting to be discussed. Make wider the line drawn in offscreen images
// OpenglUtilities.setLineWidth(gl, 1.125f);
OpenglUtilities.drawCurve(gl, dataXArray, dataYFitArray);
// OpenglUtilities.setLineWidth(gl, 1f); //default width is one
}
}
} else {
int nbX = plotData.getDataX().getSize();
......
......@@ -9,6 +9,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
......@@ -212,7 +213,7 @@ public class LiveOffScreenshotState extends OffScreenshotState implements IPrope
*/
private void initForOffScreenRendering() {
try {
//try {
ConfigManager.initInstance();
propertiesAndPlotDatas = new HashMap<String, String>();
controllerNameAndYDataPropertyName = new HashMap<String, String>();
......@@ -221,17 +222,21 @@ public class LiveOffScreenshotState extends OffScreenshotState implements IPrope
prop.removePropertyChangeListener(this);
}
// Read txt file where it is indicated which types of controllers we must look for.
InputStream stream = LiveOffScreenshotState.class.getClassLoader().getResourceAsStream(ConfigConstants.RENDERING_CONTROLLERS);
if (stream != null) {
System.out.println("offScreenRenderingPlotDataControllers file read");
DataInputStream in = new DataInputStream(stream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String controllerType;
// Loop through controller types
while ((controllerType = br.readLine()) != null) {
HashSet<String> conts = new HashSet<String>();
conts.add(ControllerAndPropertyConstants.DATA_PLOT);
conts.add(ControllerAndPropertyConstants.SCAN_SPY);
// // Read txt file where it is indicated which types of controllers we must look for.
// InputStream stream = LiveOffScreenshotState.class.getClassLoader().getResourceAsStream(ConfigConstants.RENDERING_CONTROLLERS);
// if (stream != null) {
// System.out.println("offScreenRenderingPlotDataControllers file read");
// DataInputStream in = new DataInputStream(stream);
// BufferedReader br = new BufferedReader(new InputStreamReader(in));
// String controllerType;
//
// // Loop through controller types
// while ((controllerType = br.readLine()) != null) {
for(String controllerType : conts) {
PlotDataManager.getInstance().parsePlotDatasFileForOffscreenRendering(controllerType);
Set<PlotDataDescriptor> plotDataDescriptors = PlotDataManager.getInstance().getPlotDataDescriptorsForControllerType(controllerType);
......@@ -343,14 +348,14 @@ public class LiveOffScreenshotState extends OffScreenshotState implements IPrope
}
}
}
// Close the input stream
in.close();
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
// // Close the input stream
// in.close();
// }
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment