|
|
@ -3,6 +3,9 @@ package launcher;
|
|
|
|
import javafx.application.Application;
|
|
|
|
import javafx.application.Application;
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
import model.*;
|
|
|
|
import model.*;
|
|
|
|
|
|
|
|
import view.CapteurView;
|
|
|
|
|
|
|
|
import view.ImageCtrlView;
|
|
|
|
|
|
|
|
import view.ThermostatView;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
@ -14,22 +17,25 @@ public class Launch extends Application {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void start(Stage primaryStage) throws IOException, InterruptedException {
|
|
|
|
public void start(Stage primaryStage) throws IOException, InterruptedException {
|
|
|
|
StrategyRandom captorS = new StrategyRandom(1,"Capteur Simple");
|
|
|
|
|
|
|
|
CapteurIntervalle captorI = new CapteurIntervalle(2,"Capteur Intervalle",0.0,10.0);
|
|
|
|
UnitCapteur captorI = new UnitCapteur(2,"Capteur Intervalle",new StrategyCPU());
|
|
|
|
CapteurRealiste captorR = new CapteurRealiste(3,"Capteur Realiste", 5.0, 10.0);
|
|
|
|
UnitCapteur captorR = new UnitCapteur(3,"Capteur Realiste", new StrategyCPU());
|
|
|
|
CapteurCPU captorC = new CapteurCPU(4,"Capteur CPU");
|
|
|
|
UnitCapteur captorC = new UnitCapteur(4,"Capteur CPU",new StrategyCPU());
|
|
|
|
CapteurVirtuel captorV = new CapteurVirtuel(5,"CapteurVirtuel");
|
|
|
|
CapteurVirtuel captorV = new CapteurVirtuel(5,"CapteurVirtuel");
|
|
|
|
|
|
|
|
|
|
|
|
captorV.addCapteur(captorS,1);
|
|
|
|
|
|
|
|
captorV.addCapteur(captorI,1);
|
|
|
|
captorV.addCapteur(captorI,1);
|
|
|
|
captorV.addCapteur(captorC,1);
|
|
|
|
captorV.addCapteur(captorC,1);
|
|
|
|
captorV.addCapteur(captorR,1);
|
|
|
|
captorV.addCapteur(captorR,1);
|
|
|
|
|
|
|
|
|
|
|
|
// FXML NOT WORKING
|
|
|
|
// FXML NOT WORKING
|
|
|
|
/*Stage thermostatStage = new Stage();
|
|
|
|
Stage thermostatStage = new Stage();
|
|
|
|
CapteurView capteurView = new ImageCtrlView(captor,"view/Image.fxml","mon titre");
|
|
|
|
CapteurView capteurView = new ImageCtrlView(captorV,"view/Image.fxml","mon titre");
|
|
|
|
ThermostatView thermostatView = new ThermostatView(captor,"view/Thermostat.fxml","mon titre");
|
|
|
|
for (Map.Entry<CapteurAbstrait, Integer> entry : captorV.getCapteurs().entrySet()) {
|
|
|
|
*/
|
|
|
|
CapteurAbstrait c = entry.getKey();
|
|
|
|
|
|
|
|
c.genTemp();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ThermostatView thermostatView = new ThermostatView(captorV,"view/Thermostat.fxml","mon titre");
|
|
|
|
|
|
|
|
|
|
|
|
//Random random = new Random();
|
|
|
|
//Random random = new Random();
|
|
|
|
|
|
|
|
|
|
|
|
Thread t = new Thread() {
|
|
|
|
Thread t = new Thread() {
|
|
|
|