1 package fi.jyu.mit.graphics;
2
3
13 public class EasyWindow extends Window implements Easy {
14
15 private static final long serialVersionUID = 1;
16
17
20 public EasyWindow() {
21 super();
22 this.setVisible(true);
23 }
24
25
30 public EasyWindow(int width, int height) {
31 super(width, height);
32 this.setVisible(true);
33 }
34
35 @Override
36 public Drawable addShape(Drawable shape) {
37 return add(shape);
38 }
39
40 @Override
41 public Line addLine(double x1, double y1, double x2, double y2) {
42 return (Line)add(new Line(x1, y1, x2, y2));
43 }
44
45
46 @Override
47 public Line addLine(double x1, double y1, double z1, double x2, double y2, double z2) {
48 return (Line)add(new Line(x1, y1, z1, x2, y2, z2));
49 }
50
51
52 @Override
53 public Circle addCircle(double x, double y, double r) {
54 return (Circle)add(new Circle(x, y, r));
55 }
56
57 @Override
58 public Circle addCircle(double x, double y, double z, double r) {
59 return (Circle)add(new Circle(x, y, z, r));
60 }
61
62
63 @Override
64 public Polygon addPolygon(double[] xpoints, double[] ypoints) {
65 return (Polygon)add(new Polygon(xpoints, ypoints));
66 }
67
68 @Override
69 public Polygon addPolygon(double[][] points) {
70 return (Polygon)add(new Polygon(points));
71 }
72
73 @Override
74 public FillPolygon addFillPolygon(double[] xpoints, double[] ypoints) {
75 return (FillPolygon)add(new FillPolygon(xpoints, ypoints));
76 }
77
78 @Override
79 public FillPolygon addFillPolygon(double[][] points) {
80 return (FillPolygon)add(new FillPolygon(points));
81 }
82
83 @Override
84 public Axis addAxis(double xLength, double yLength, double zLength) {
85 return (Axis)add(new Axis(xLength, yLength, zLength));
86 }
87
88 @Override
89 public Axis addAxis(double xLength, double yLength, double zLength, double x, double y, double z) {
90 return (Axis)add(new Axis(xLength, yLength, zLength, x, y, z));
91 }
92 }
93