-
Notifications
You must be signed in to change notification settings - Fork 0
/
Interface.java
89 lines (68 loc) · 2.69 KB
/
Interface.java
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package investmentinterfacetrial;
import java.io.IOException;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class Interface extends Application {
static PinStock pinned;
@Override
public void start(Stage primaryStage) throws IOException, InterruptedException {
//Objects for different sections of the interface
SearchQuoteGUI searchQuote = new SearchQuoteGUI();
IndexTicker indexTicker = new IndexTicker();
InvCalcFX invCalc = new InvCalcFX();
pinned = new PinStock();
//LARGE BORDER PANE CONTAINS THAT CONTAINS INNER CONTAINERS
BorderPane pane = new BorderPane();
pane.setStyle("-fx-background-color: #000000");
//VBOX TO CONTAIN TOP AND BOTTOM
VBox v = new VBox();
//IndexTicker section
BorderPane indexPane = new BorderPane();
indexPane.setCenter(indexTicker.startIndexTicker(primaryStage));
indexPane.setPadding(new Insets(10, 10, 10, 10));
//SearchQuote Section
BorderPane SQpane = new BorderPane();
SQpane.setTop(searchQuote.startSQ(primaryStage));
SQpane.setPadding(new Insets(10, 10, 10, 10));
//Investment Calc section
BorderPane investmentCalcPane = new BorderPane();
investmentCalcPane.setTop(invCalc.startInvCalc(primaryStage));
//HBOX to hold 3 small apps in a row at TOP CENTER of OUTER BP
HBox h = new HBox();
h.setPadding(new Insets(10, 10, 10, 10));
h.getChildren().add(indexPane);
h.getChildren().add(SQpane);
h.getChildren().add(investmentCalcPane);
//Add hbox to vbox
v.getChildren().add(h);
/*
END OF TOP HBOX SECTION
*/
/*
START OF BOTTOM PINNED STOCK SECTION
*/
BorderPane pinnedPane = new BorderPane();
pinnedPane.setCenter(pinned.startPin(primaryStage));
v.getChildren().add(pinnedPane);
pane.setCenter(v);
BorderPane.setAlignment(v, Pos.CENTER);
//pane.getChildren().add(pinnedPane);
//BorderPane.setAlignment(pinnedPane, Pos.BOTTOM_CENTER);
//pane.setBottom(pinnedPane);
//SCENE STUFF
Scene scene = new Scene(pane, 900, 700);
primaryStage.setTitle("Inv Interface");
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}