Datasets:

ArXiv:
License:
File size: 843 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package client.src.vues;

import java.io.IOException;
import java.net.URL;

import client.src.controleurs.BaseControleur;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Modality;
import javafx.stage.Stage;

public abstract class BaseVue extends Stage {
    protected BaseControleur _controleur;

    public BaseVue(String nomFichier) throws IOException {
        URL fxmlURL = getClass().getResource(nomFichier);
        FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL);
        var node = (Scene) fxmlLoader.load();

        _controleur = (BaseControleur) fxmlLoader.getController();
        _controleur.setVue(this);

        this.setScene(node);
        this.getIcons().add(new Image("file:client/res/icon.png"));
        this.initModality(Modality.APPLICATION_MODAL);
    }
}