-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClinicsMainWindowController.java
179 lines (147 loc) · 4.45 KB
/
ClinicsMainWindowController.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*
Name: Alisher Sattarbek
Faculty: Engineering
Course and group: 1EN03D
Description: JavaFX Project - Qaida
Teacher: Shamiluulu Shahriar
*/
package controller;
import Main.Signin;
import com.jfoenix.controls.JFXDrawer;
import com.jfoenix.controls.JFXHamburger;
import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.animation.FadeTransition;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.util.Duration;
@SuppressWarnings("CssUnknownTarget")
public class ClinicsMainWindowController implements Initializable {
Signin signin;
Stage stage;
public static String tableName = "";
public void main(Signin signin, Stage stage) {
this.signin = signin;
this.stage = stage;
}
@FXML
private Pane backgroundPane;
@FXML
private JFXDrawer drawer;
@Override
public void initialize(URL url, ResourceBundle rb) {
try {
backgroundPane.setStyle(" -fx-background-image: url(\"/Users/alishersattarbek/Downloads/src/image.png;");
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/navigationDrawerFXML.fxml"));
AnchorPane pane = loader.load();
drawer.setSidePane(pane);
pane.addEventHandler(MouseEvent.MOUSE_PRESSED, (e) -> {
if (drawer.isShown()) {
drawer.close();
} else {
drawer.open();
}
});
} catch (IOException ex) {
ex.printStackTrace();
}
}
@FXML
public void OpenClinicWindow0(ActionEvent event) {
try {
tableName = "Internalmedicine";
signin.clinicName = "Internal Medicine";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow1(ActionEvent event) {
try {
tableName = "Physiotherapy";
signin.clinicName = "Physiotherapy";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow2(ActionEvent event) {
try {
tableName = "Neurology";
signin.clinicName = "Neurology";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow3(ActionEvent event) {
try {
tableName = "Cardiology";
signin.clinicName = "cardiology";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow4(ActionEvent event) {
try {
tableName = "Earnose";
signin.clinicName = "Ear and Nose";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow5(ActionEvent event) {
try {
tableName = "Orthopedics";
signin.clinicName = "Orthopedics";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow6(ActionEvent event) {
try {
tableName = "Dentalclinic";
signin.clinicName = "Dental";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow7(ActionEvent event) {
try {
tableName = "Dermatology";
signin.clinicName = "Dermatology";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
@FXML
public void OpenClinicWindow8(ActionEvent event) {
try {
tableName = "Ophthalmology";
signin.clinicName = "Ophthalmology";
signin.SubClinicWindow();
signin.clinicsWindowClose();
} catch (Exception ex) {
}
}
}