49 行
EOLなし
1.2 KiB
Java
49 行
EOLなし
1.2 KiB
Java
package fr.insa.clavardator;
|
|
|
|
import fr.insa.clavardator.ui.MainController;
|
|
import fr.insa.clavardator.users.UserList;
|
|
import fr.insa.clavardator.util.Log;
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Scene;
|
|
import javafx.stage.Stage;
|
|
|
|
// See here : https://github.com/jfoenixadmin/JFoenix/blob/master/demo/src/main/java/demos/components/DrawerDemo.java
|
|
|
|
public class MainApp extends Application {
|
|
|
|
private UserList userList;
|
|
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
|
|
@Override
|
|
public void start(Stage stage) throws Exception {
|
|
Log.verboseLevel = 4;
|
|
Log.v("START", "Application started");
|
|
|
|
final FXMLLoader mainLoader = new FXMLLoader(getClass().getResource("ui/scene.fxml"));
|
|
final Parent content = mainLoader.load();
|
|
MainController mainController = mainLoader.getController();
|
|
|
|
userList = new UserList();
|
|
mainController.setUserList(userList);
|
|
|
|
Scene scene = new Scene(content);
|
|
|
|
stage.setScene(scene);
|
|
stage.setTitle("Clavardator");
|
|
stage.setMinHeight(640);
|
|
stage.setMinWidth(800);
|
|
// stage.setMaximized(true);
|
|
stage.show();
|
|
}
|
|
|
|
@Override
|
|
public void stop() throws Exception {
|
|
userList.destroy();
|
|
super.stop();
|
|
}
|
|
} |