|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package view;
|
|
|
|
|
|
|
|
|
|
import javafx.beans.property.Property;
|
|
|
|
|
import javafx.fxml.FXML;
|
|
|
|
|
import javafx.scene.control.*;
|
|
|
|
|
import javafx.scene.text.Text;
|
|
|
|
@ -15,27 +16,28 @@ public class VueCapteurSimple extends VueCapteur{
|
|
|
|
|
private TextField nomCapteur;
|
|
|
|
|
@FXML
|
|
|
|
|
private Label idCapteur;
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
@FXML
|
|
|
|
|
private Text valeurCapteur;
|
|
|
|
|
private Label valeurCapteur;
|
|
|
|
|
@FXML
|
|
|
|
|
private Spinner<Integer> spinTps;*/
|
|
|
|
|
private Spinner<Integer> spinTps;
|
|
|
|
|
Capteur capteur;
|
|
|
|
|
|
|
|
|
|
public VueCapteurSimple(Capteur capteur) throws IOException {
|
|
|
|
|
super(capteur,"views/CapteurSimple.fxml");
|
|
|
|
|
this.capteur=capteur;
|
|
|
|
|
idCapteur.textProperty().bindBidirectional(capteur.idProperty());
|
|
|
|
|
|
|
|
|
|
nomCapteur.textProperty().bindBidirectional(capteur.nomProperty());
|
|
|
|
|
capteur.setNom("aaa");
|
|
|
|
|
/*
|
|
|
|
|
valeurCapteur.textProperty().bindBidirectional(capteur.valeurProperty());
|
|
|
|
|
*/
|
|
|
|
|
spinTps.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(0,10,capteur.getTpsGen(),1));
|
|
|
|
|
capteur.tpsGenProperty().bind(spinTps.valueProperty());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
spinTps.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(0,10,1,1));
|
|
|
|
|
spinTps.valueFactoryProperty().bindBidirectional(capteur.tpsGenProperty());*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|