package View;

import Model.ImageSensor;
import javafx.fxml.FXML;
import javafx.scene.image.ImageView;
import javafx.scene.text.Text;
import javafx.util.converter.NumberStringConverter;

import java.io.IOException;

public class ImageSensorController extends FXMLWindow{

    @FXML
    private Text temp;

    @FXML
    private ImageView img;

    public ImageSensorController(ImageSensor sens,String title, String url) throws IOException {
        super(title, url);
        temp.textProperty().bindBidirectional(sens.temperatureProperty(),new NumberStringConverter());
        img.imageProperty().bindBidirectional(sens.getImage());
    }
}
