-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.java
More file actions
117 lines (83 loc) · 3.2 KB
/
Main.java
File metadata and controls
117 lines (83 loc) · 3.2 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* Author: Soft Red (Jeffery Yang, Dylan Wheeler, Steven Loppe, Thien-Kim Nguyen, Hafsa Zia) - 2020
* Created for SENG 300 at The University of Calgary during the winter semester of 2020
*/
import global.Navigation;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import model.DataStore;
import view.*;
public class Main extends Application{
Scene login_scene, researcher_scene, reviewer_scene, editor_scene;
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
Navigation.setPrimaryStage(primaryStage);
primaryStage.setTitle("Journal Submission System");
/*
* Populate the login page
*/
//Pane loginPane = new view.LoginPane(primaryStage);
// BorderPane login_layout = new BorderPane();
//
// TextField login_tf = new TextField();
//
// Button login_b = new Button("Press Me");
// // TODO: set this to have logic based on the account given as input
// login_b.setOnAction(e -> {
// primaryStage.setScene(researcher_scene);
// });
//
// login_layout.setTop(login_b);
// login_layout.setCenter(login_tf);
// login_scene = new Scene(login_layout, 800, 600);
/*
* Populate the Researcher User page
*/
//view.ResearcherPane researcher_layout = new view.ResearcherPane(primaryStage);
//researcher_scene = new Scene(researcher_layout.getPane(), 600, 800);
/*
* Populate the Reviewer User page
*/
//view.ReviewerPane reviewer_layout = new view.ReviewerPane(primaryStage);
//reviewer_scene = new Scene(reviewer_layout.getPane(), 600, 800);
/*
* Populate the Editor User page
*/
//view.EditorPane editor_layout = new view.EditorPane(primaryStage);
//editor_scene = new Scene(editor_layout.getPane(), 600, 800);
// primaryStage.setScene(login_scene);
// primaryStage.show();
//
System.out.println("starting . . . ");
//TEMP
//FrontPane frontPage = new FrontPane(primaryStage, "Front Page");
//Scene scene = new Scene(frontPage, 600, 600);
LoginPane loginPane = new LoginPane(primaryStage);
Scene scene = new Scene(loginPane, 600, 600);
primaryStage.setScene(scene);
primaryStage.show();
}
public User[] getAccounts() {
// Gets accounts from a file and returns them all as an array
// TODO: read accounts from a separate file, call methods in each user class to get values as objects
User[] accounts = new User[3];
return accounts;
}
public void addAccount(User aUser) {
// TODO: access accounts file and save this user to a new line
}
public void removeAccount(User aUser) {
// Should this take the user or something like an ID or index
}
}