public MainWindowModel(Stage stage) {
        final Stage primeStage = this.stage = stage;
        Insets insets = new Insets(10, 10, 10, 10);
        Insets insideInsets = new Insets(10, 0, 10, 0);
        Insets verticalInsets = new Insets(0, 10, 0, 10);

        /*
         * Setting the menu
         */

        MenuItem save = new MenuItem("save");
        MenuItem search = new MenuItem("search");
        save.addEventHandler(ActionEvent.ANY, new EventHandler() {
            @Override
            public void handle(Event t) {
                ElemFactory.saveDirectoryChooser(primeStage);
            }
        });
        search.addEventHandler(ActionEvent.ANY, new EventHandler() {
            @Override
            public void handle(Event t) {
                ElemFactory.searchDirectoryChooser(primeStage);
            }
        });
        settingsMenu.getItems().addAll(save, search);
        menuBar.getMenus().add(settingsMenu);

        /*
         * Setting zoomSliderVBox
         */

        zoomSlider.setBlockIncrement(0.005);
        zoomSlider.valueProperty().addListener(new ChangeListener<Number>() {
            @Override
            public void changed(ObservableValue<? extends Number> ov, Number _old, Number _new) {
                updateImageViewZoom(_new);
            }
        });
        Label zoomLabel = new Label("Zoom");
        //zoomLabel.getFont().
        zoomSlider.setOrientation(Orientation.VERTICAL);
        zoomSliderVBox.setAlignment(Pos.CENTER);
        zoomSliderVBox.getChildren().addAll(zoomLabel, zoomSlider);

        /*
         * Setting imageHBox
         */

        imageView.setGrab();
        HBox.setMargin(imageView.getPane(), insets);
        HBox.setMargin(zoomSliderVBox, insets);
        imageHBox.setAlignment(Pos.CENTER);
        imageHBox.getChildren().addAll(imageView.getPane(), zoomSliderVBox);

        /*
         * Setting ratioSliderHBox
         */

        ratioSlider.valueProperty().addListener(new ChangeListener<Number>() {
            @Override
            public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
                imageView.adjustRatio((double) t1);
            }
        });
        Label ratioLabel = new Label("Ratio");
        // setting the font correctly....
        ratioSlider.setOrientation(Orientation.HORIZONTAL);
        ratioSliderHBox.setAlignment(Pos.CENTER);
        HBox.setMargin(ratioLabel, verticalInsets);
        ratioSliderHBox.getChildren().addAll(ratioLabel, ratioSlider);

        /*
         * Setting buttonHBox
         */

        newButton.addEventHandler(ActionEvent.ACTION, new EventHandler() {
            @Override
            public void handle(Event t) {
                Image image = null;
                try {
                    image = ElemFactory.imageChooser(primeStage);
                } catch (FileNotFoundException ex) {
                    Dialog.showError("Image invalide", "Image non trouvée. Assurez vous qu'il s'agisse bien d'une image, et que vous ayez les droits d'accès.");
                }
                if (image != null) {
                    imageView.loadImage(image);
                }
            }
        });
        okButton.addEventHandler(ActionEvent.ACTION, new EventHandler() {
            @Override
            public void handle(Event t) {
                if (!"".equals(textField.getText())) {
                    File file = new File(ConfGetter.saveDirectory(), textField.getText() + ".png");
                    try {
                        new Stamp(imageView.getCroppedImage(), textField.getText()).writeToDisk(file);
                    } catch (IOException ex) {
                        Logger.getLogger(MainWindowModel.class.getName()).log(Level.SEVERE, null, ex);
                        Dialog.showError("Erreur", "Impossible d'écrire l'image générée sur le disque.");
                    }
                } else {
                    System.out.println("textfield vide");
                }
            }
        });
        HBox.setMargin(newButton, insets);
        HBox.setMargin(okButton, insets);
        buttonHBox.setAlignment(Pos.CENTER);
        buttonHBox.getChildren().addAll(newButton, okButton);
        VBox.setMargin(imageView, insets);
        VBox.setMargin(textField, insets);
        vBox.getChildren().addAll(menuBar, imageHBox, ratioSliderHBox, textField, buttonHBox);
        scene = ElemFactory.scene(vBox);
        stage.setScene(scene);
        stage.show();
    }