-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventPageController.java
More file actions
44 lines (32 loc) · 1.05 KB
/
EventPageController.java
File metadata and controls
44 lines (32 loc) · 1.05 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
package ToDo.src;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import java.net.URL;
import java.util.ResourceBundle;
public class EventPageController implements Initializable {
@FXML
private Label titleLabel;
@FXML
private Label detailLabel;
@FXML
private Button editButton;
private Runnable onEditButtonClicked;
public void setOnEditButtonClicked(Runnable handler) {
this.onEditButtonClicked = handler;
}
@FXML
private void handleEditButtonClicked(ActionEvent event) {
if (onEditButtonClicked != null) {
onEditButtonClicked.run();
}
System.out.println("Edit button clicked!");
}
@Override
public void initialize(URL location, ResourceBundle resources) {
titleLabel.setText("ToDo Event List");
detailLabel.setText("If you wish to enter event, click edit.");
}
}