Biblioteca Java - Rev 32
Subversion Repositories:
(root)/Courses and labs samples/ISP/Exemple_ISP_Cluj_2015/ElevatorCurs/src/elevatorcurs/ui/ElevatorMVCController.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package elevatorcurs.ui;
import elevatorcurs.model.*;
/**
*
* @author Mihai Hulea mihai.hulea@aut.utcluj.ro
*/
public class ElevatorMVCController {
Elevator e;
ElevatorUI ui;
Controller c;
public ElevatorMVCController(Elevator e, ElevatorUI ui, Controller c) {
this.e = e;
this.ui = ui;
this.c = c;
e.addObserver(ui);
ui.initControler(this);
ui.setVisible(true);
}
void executeFloorCommand(int i){
c.addJob(new Job(i));
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package elevatorcurs.ui;
import elevatorcurs.model.*;
/**
*
* @author Mihai Hulea mihai.hulea@aut.utcluj.ro
*/
public class ElevatorMVCController {
Elevator e;
ElevatorUI ui;
Controller c;
public ElevatorMVCController(Elevator e, ElevatorUI ui, Controller c) {
this.e = e;
this.ui = ui;
this.c = c;
e.addObserver(ui);
ui.initControler(this);
ui.setVisible(true);
}
void executeFloorCommand(int i){
c.addJob(new Job(i));
}
}