package pro.simpleproject.core.primary;

public class PrimaryController {

}

@@ -38,40 +38,1366 @@
 y;%0A%0A
-public class PrimaryController %7B
+import javafx.application.Platform;%0Aimport javafx.event.ActionEvent;%0Aimport javafx.scene.input.MouseEvent;%0Aimport javafx.scene.layout.BorderPane;%0Aimport javafx.scene.layout.Pane;%0Aimport javafx.stage.Stage;%0Aimport pro.simpleproject.core.tray.TrayBuilder;%0A%0Apublic class PrimaryController %7B%0A%09public BorderPane pane_base;%0A%09public Pane pane_top;%0A%09public final double%5B%5D d = new double%5B2%5D;%0A%09public Pane pane_system;%0A%0A%09public void initial(MouseEvent e) %7B%0A%09%09d%5B0%5D = e.getScreenX() - pane_top.getScene().getWindow().getX();%0A%09%09d%5B1%5D = e.getScreenY() - pane_top.getScene().getWindow().getY();%0A%09%7D%0A%0A%09public void reposition(MouseEvent e) %7B%0A%09%09pane_top.getScene().getWindow().setX(e.getScreenX() - d%5B0%5D);%0A%09%09pane_top.getScene().getWindow().setY(e.getScreenY() - d%5B1%5D);%0A%09%09Stage stage = (Stage) pane_top.getScene().getWindow();%0A%09%09if (stage.isMaximized()) %7B%0A%09%09%09stage.setMaximized(false);%0A%09%09%7D%0A%09%7D%0A%0A%09public void close(ActionEvent e) %7B%0A%09%09Platform.exit();%0A%09%09TrayBuilder.close();%0A%09%7D%0A%0A%09public void maximize(ActionEvent e) %7B%0A%09%09Stage stage = (Stage) pane_system.getScene().getWindow();%0A%09%09if (stage.isMaximized()) %7B%0A%09%09%09stage.setMaximized(false);%0A%09%09%7D else %7B%0A%09%09%09stage.setMaximized(true);%0A%09%09%7D%0A%09%7D%0A%0A%09public void minimize(ActionEvent e) %7B%0A%09%09((Stage) pane_system.getScene().getWindow()).setIconified(true);%0A%09%7D%0A%0A%09public void minimize2(ActionEvent e) %7B%0A%09%09pane_system.getScene().getWindow().hide();%0A%09%7D
 %0A%0A%7D%0A

Update PrimaryController.java