-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControllerSubStat.java
More file actions
54 lines (48 loc) · 1.46 KB
/
ControllerSubStat.java
File metadata and controls
54 lines (48 loc) · 1.46 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
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.Pane;
import javafx.scene.control.CheckMenuItem;
import javafx.scene.control.Button;
import java.net.URL;
import java.util.ResourceBundle;
import java.io.IOException;
import javafx.scene.control.DatePicker;
import java.time.LocalDate;
import java.util.NoSuchElementException;
import javafx.scene.control.Label;
import java.util.Observable;
import java.util.Observer;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.scene.layout.AnchorPane; // Assuming rightPane is of type AnchorPane
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.time.format.DateTimeFormatter;
import javafx.scene.control.Alert;
public class ControllerSubStat {
// Singleton pattern
private static ControllerSubStat instance;
// Texts
@FXML
private Label lblStatText;
/**
* Constructor
*/
public ControllerSubStat() {}
// Singleton getInstance() method
public static ControllerSubStat getInstance() {
if (instance == null) {
instance = new ControllerSubStat();
}
return instance;
}
/**
* This update method will update the relevant texts
*/
public void updateStatistic(String text) {
lblStatText.setText("Statistic: " + text);
}
}