Skip to content
Snippets Groups Projects
Commit d4ee9a21 authored by AREZKI Celia's avatar AREZKI Celia
Browse files

Move all the old code into a package named tp3, and create a new package for...

Move all the old code into a package named tp3, and create a new package for tp5, then add  the Shape interface within it
parent 3049a187
No related branches found
No related tags found
No related merge requests found
Showing
with 24 additions and 18 deletions
package serializer;
import javafx.scene.canvas.Canvas;
import javafx.scene.control.Alert;
import javafx.stage.FileChooser;
import shape.Shape;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;
public class DrawerWithSave extends state.Drawer {
......
package serializer;
import shape.Shape;
import shape.tp3.Shape;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.stream.Collector;
public class ShapeReader {
public static List<Shape> read(File file) throws IOException {
......
package serializer;
import shape.Shape;
import shape.tp3.Shape;
import java.io.File;
import java.io.IOException;
......
......@@ -8,6 +8,7 @@ import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import shape.tp3.*;
public class App extends Application {
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
import java.util.ArrayList;
import java.util.List;
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
......
package shape;
package shape.tp3;
import javafx.scene.canvas.GraphicsContext;
import javafx.geometry.Point2D;
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
......
package shape;
package shape.tp3;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
......
package shape;
package shape.tp3;
import javafx.scene.canvas.GraphicsContext;
import java.util.ArrayList;
import java.util.List;
......
package shape.tp5;
import javafx.scene.canvas.GraphicsContext;
public interface Shape {
void paint(GraphicsContext graphicsContext);
boolean contains(double x, double y);
void translate(double dx, double dy);
}
package state;
import javafx.scene.canvas.Canvas;
import shape.Circle;
import shape.Shape;
import shape.tp3.Shape;
import java.util.ArrayList;
import java.util.List;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment