1 package org.ximtec.igesture.tool.core;
2
3 import javax.swing.JFrame;
4
5 import org.ximtec.igesture.tool.util.ComponentFactory;
6
7 public class DefaultView extends JFrame{
8
9
10
11 private Controller controller;
12
13 public DefaultView(Controller controller){
14 this.controller = controller;
15 if(this.controller == null){
16 throw new RuntimeException("Controller must not be null.");
17 }
18 }
19
20
21
22
23
24 public Controller getController() {
25 return controller;
26 }
27
28
29
30
31
32 public ComponentFactory getComponentFactory(){
33 return controller.getLocator().getService(ComponentFactory.class.getName(), ComponentFactory.class);
34 }
35 }