From c3d957747212983f171e18821a383467961319e6 Mon Sep 17 00:00:00 2001 From: Favary Pierre Date: Sat, 3 Apr 2021 15:42:24 +0200 Subject: [PATCH] ? --- .../main/java/org/insa/graphs/gui/simple/Launch.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/be-graphes-gui/src/main/java/org/insa/graphs/gui/simple/Launch.java b/be-graphes-gui/src/main/java/org/insa/graphs/gui/simple/Launch.java index 179ffaa..914b8ac 100644 --- a/be-graphes-gui/src/main/java/org/insa/graphs/gui/simple/Launch.java +++ b/be-graphes-gui/src/main/java/org/insa/graphs/gui/simple/Launch.java @@ -14,6 +14,7 @@ import org.insa.graphs.gui.drawing.components.BasicDrawing; import org.insa.graphs.model.Graph; import org.insa.graphs.model.Path; import org.insa.graphs.model.io.BinaryGraphReader; +import org.insa.graphs.model.io.BinaryPathReader; import org.insa.graphs.model.io.GraphReader; import org.insa.graphs.model.io.PathReader; @@ -54,20 +55,23 @@ public class Launch { new DataInputStream(new BufferedInputStream(new FileInputStream(mapName)))); // TODO: Read the graph. - final Graph graph = null; + final Graph graph = reader.read(); // Create the drawing: final Drawing drawing = createDrawing(); // TODO: Draw the graph on the drawing. + drawing.drawGraph(graph); // TODO: Create a PathReader. - final PathReader pathReader = null; + final PathReader pathReader = new BinaryPathReader( + new DataInputStream(new BufferedInputStream(new FileInputStream(pathName)))); // TODO: Read the path. - final Path path = null; + final Path path = pathReader.readPath(graph); // TODO: Draw the path. + drawing.drawPath(path); } }