-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainPage.java
More file actions
92 lines (65 loc) · 2.02 KB
/
Copy pathMainPage.java
File metadata and controls
92 lines (65 loc) · 2.02 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
package jfx;
import java.io.IOException;
import btp400.a1.Material;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
public class MainPage extends btp400.a1.InventoryManager{
@FXML
private Button logout;
@FXML
private Button cars;
@FXML
private Button clear;
@FXML
private Button authors;
@FXML
private Button jobs;
@FXML
private Button inventorycount;
@FXML
private Button inventory;
@FXML
private TextArea displayArea;
@FXML
void inventoryClicked(ActionEvent event) {
String fInv = " " ;
//for( Material e :fullInventory) {
for( int i = 0; i < fullInventory.size(); ++i) {
//displayArea.setText("\nName: "+ e.getName() + ", Quantity: "+ e.getQuantity());
displayArea.setText(fInv += "Material Name: "+fullInventory.get(i).getName() + " || Quantity: " +fullInventory.get(i).getQuantity()+"\n");
}
}
@FXML
void inventoryCountClicked (ActionEvent event) throws IOException {
//String currCount ="";
//displayArea.setText(getInvCountOf("BOLT"));
Main m = new Main();
m.changeScene("InventoryCount.fxml");
}
@FXML
void jobsClicked(ActionEvent event) throws IOException {
Main m = new Main();
m.changeScene("Jobs.fxml");
}
@FXML
public void userlogout(ActionEvent event) throws IOException{
Main m = new Main();
m.changeScene("Sample.fxml");
}
@FXML
void authorsClicked(ActionEvent event) throws IOException {
String name = "";
displayArea.setText(name +=" Atif Ali Email: [email protected] \n Sahil Patel Email: [email protected]\n Aditya Rahman Email: [email protected]\n");
}
@FXML
void carsClicked(ActionEvent event) throws IOException {
Main m = new Main();
m.changeScene("Cars.fxml");
}
@FXML
void clearClicked(ActionEvent event) {
displayArea.setText("");
}
}