forked from AmrDeveloper/Astro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
38 lines (31 loc) · 1.25 KB
/
Main.java
File metadata and controls
38 lines (31 loc) · 1.25 KB
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
30
31
32
33
34
35
36
37
38
package astro;
import astro.syntax.Keywords;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import astro.constants.Astro;
public class Main extends Application {
public static Stage mainStage;
@Override
public void start(Stage primaryStage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("views/main_view.fxml"));
Scene scene = new Scene(root, Astro.APP_WIDTH, Astro.APP_HEIGHT);
scene.getStylesheets().add("astro/styles/editor_style.css");
scene.getStylesheets().add("astro/styles/tab_pane_style.css");
scene.getStylesheets().add("astro/styles/menu_style.css");
scene.getStylesheets().add("astro/styles/result_area_style.css");
scene.getStylesheets().add("astro/styles/list_style.css");
primaryStage.getIcons().add(Astro.APP_ICON);
primaryStage.setTitle(Astro.APP_NAME);
primaryStage.setScene(scene);
primaryStage.setOnCloseRequest(event -> System.exit(0));
primaryStage.show();
Keywords.onKeywordsBind();
mainStage = primaryStage;
}
public static void main(String[] args) {
launch(args);
}
}