-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUISplashScreen.java
More file actions
44 lines (36 loc) · 1.29 KB
/
UISplashScreen.java
File metadata and controls
44 lines (36 loc) · 1.29 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
39
40
41
42
43
44
import javafx.application.Application;
import javafx.geometry.*;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.image.*;
import javafx.scene.layout.*;
import javafx.scene.text.*;
import javafx.stage.*;
public class UISplashScreen extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage window) {
window.initStyle(StageStyle.UNDECORATED);
window.setTitle("VACCS Integer Representation");
Button button = new Button("Start");
button.setOnAction(e -> {
window.close();
UIVariableRepresentation.display("signed int", "0");
});
Label label = new Label("Author: James Walker\n\nThis work has been supported by the National Science Foundation under grants DUE-1245310, DGE-1522883, DGE-1523017, IIS-1456763, and IIS-1455886.");
label.setWrapText(true);
label.setTextAlignment(TextAlignment.CENTER);
Image image = new Image("assets/splash.png");
ImageView imv = new ImageView();
imv.setImage(image);
VBox layout = new VBox();
layout.setSpacing(50);
layout.getChildren().addAll(imv, label, button);
layout.setAlignment(Pos.CENTER);
Scene scene = new Scene(layout, 300, 400);
window.setScene(scene);
window.show();
}
}