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 public void setObject(Transformable object) {
28 this.objectToControl = object;
29 }
30
31 public Transformable getObject() {
32 return objectToControl;
33 }
34
35 public void showController() {
36 this.setVisible(true);
37 }
38
39 public void hideController() {
40 this.setVisible(false);
41 }
42
43
44 }
45