|
@@ -5,7 +5,7 @@
|
|
*/
|
|
*/
|
|
package camsucks;
|
|
package camsucks;
|
|
|
|
|
|
-import java.awt.Toolkit;
|
|
|
|
|
|
+import camsucks.model.ComputerModel;
|
|
import javafx.application.Application;
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Parent;
|
|
@@ -49,21 +49,19 @@ public class CAMSucks extends Application {
|
|
@Override
|
|
@Override
|
|
public void start(Stage stage) throws Exception {
|
|
public void start(Stage stage) throws Exception {
|
|
|
|
|
|
-
|
|
|
|
// Model
|
|
// Model
|
|
ComputerModel model = new ComputerModel("COM3");
|
|
ComputerModel model = new ComputerModel("COM3");
|
|
|
|
|
|
// View
|
|
// View
|
|
-
|
|
|
|
FXMLLoader loader = new FXMLLoader();
|
|
FXMLLoader loader = new FXMLLoader();
|
|
loader.setLocation(getClass().getResource("FXMLView.fxml"));
|
|
loader.setLocation(getClass().getResource("FXMLView.fxml"));
|
|
Parent root = loader.load();
|
|
Parent root = loader.load();
|
|
|
|
|
|
-
|
|
|
|
// Controller
|
|
// Controller
|
|
FXMLViewController controller = loader.getController();
|
|
FXMLViewController controller = loader.getController();
|
|
controller.setModel(model);
|
|
controller.setModel(model);
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ //Scene
|
|
Scene scene = new Scene(root);
|
|
Scene scene = new Scene(root);
|
|
setUserAgentStylesheet(STYLESHEET_CASPIAN);
|
|
setUserAgentStylesheet(STYLESHEET_CASPIAN);
|
|
stage.setResizable(false);
|
|
stage.setResizable(false);
|
|
@@ -75,8 +73,7 @@ public class CAMSucks extends Application {
|
|
stage.setOnCloseRequest(event -> {
|
|
stage.setOnCloseRequest(event -> {
|
|
model.getGrid().disconnect();
|
|
model.getGrid().disconnect();
|
|
System.exit(0);
|
|
System.exit(0);
|
|
- });
|
|
|
|
-
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -85,7 +82,6 @@ public class CAMSucks extends Application {
|
|
*/
|
|
*/
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
launch(args);
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|