forked from nus-cs2103-AY1920S1/addressbook-level3
-
Notifications
You must be signed in to change notification settings - Fork 5
/
ResultDisplay.java
34 lines (26 loc) · 889 Bytes
/
ResultDisplay.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
package seedu.moneygowhere.ui;
import static java.util.Objects.requireNonNull;
import javafx.fxml.FXML;
import javafx.scene.control.TextArea;
import javafx.scene.layout.Region;
/**
* A ui for the status bar that is displayed at the header of the application.
*/
public class ResultDisplay extends UiPart<Region> {
private static final String FXML = "ResultDisplay.fxml";
@FXML
private TextArea resultDisplay;
public ResultDisplay() {
super(FXML);
resultDisplay.setText("Welcome to MoneyGoWhere!");
}
public void setFeedbackToUser(String feedbackToUser) {
requireNonNull(feedbackToUser);
if (feedbackToUser.contains("Status: Deficit")) {
resultDisplay.setStyle("-fx-text-fill: #ff4253 ;");
} else {
resultDisplay.setStyle("");
}
resultDisplay.setText(feedbackToUser);
}
}