1 package fi.jyu.mit.graphics;
2
3 import java.awt.*;
4
5
6
11 public class BasicController extends Container implements ObjectController {
12
13 private static final long serialVersionUID = 1L;
14 private Transformable objectToControl;
15
16
20 public BasicController(Transformable objectToControl) {
21 super();
22 this.objectToControl = objectToControl;
23 this.setBounds(0, 0, 150, 150);
24 setLayout(new BorderLayout());
25 }
26
27 @Override
28 public void setObject(Transformable object) {
29 this.objectToControl = object;
30 }
31
32 @Override
33 public Transformable getObject() {
34 return objectToControl;
35 }
36
37 @Override
38 public void showController() {
39 this.setVisible(true);
40 }
41
42 @Override
43 public void hideController() {
44 this.setVisible(false);
45 }
46
47
48 }
49