Skip to content
Snippets Groups Projects
Commit d7744a7b authored by MANSOUR Chadi's avatar MANSOUR Chadi
Browse files

all classes created

parent c195287b
No related branches found
No related tags found
No related merge requests found
Pipeline #31448 failed
package shape;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
import java.util.List;
public class AbstractShape implements Shape {
List<Point2D> points;
public AbstractShape(List<Point2D> points) {
this.points = points;
}
public List<Point2D> addPoints(Point2D points){
this.points.add(points);
return this.points;
}
@Override
public int pointsCount() {
return 0;
}
@Override
public Point2D point(int index) {
return null;
}
@Override
public void draw(GraphicsContext context) {
}
}
package shape;
import javafx.scene.canvas.GraphicsContext;
public class BorderDecorator extends Decorator {
double radius;
public BorderDecorator(Shape decoratedShape ,double radius) {
super(decoratedShape);
this.radius = radius;
}
public void drawDecoration(GraphicsContext context) {
}
}
package shape;
import javafx.scene.canvas.GraphicsContext;
public class CenterDecorator extends Decorator{
double radius;
public CenterDecorator(Shape decoratedShape, double radius) {
super(decoratedShape);
this.radius = radius;
}
public void drawDecoration(GraphicsContext context) {
}
}
package shape;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
public class Decorator implements Shape {
private Shape shape;
public Decorator(Shape decoratedShape) {
this.shape = decoratedShape;
}
@Override
public int pointsCount() {
return 0;
}
@Override
public Point2D point(int index) {
return null;
}
@Override
public void draw(GraphicsContext context) {
}
public void drawDecoration(GraphicsContext context) {
}
}
package shape;
import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
public class Polygon implements Shape {
Color color;
public Polygon(Color color, Point2D... points) {
this.color = color;
}
@Override
public int pointsCount() {
return 0;
}
@Override
public Point2D point(int index) {
return null;
}
@Override
public void draw(GraphicsContext context) {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment