-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddWindow.java
More file actions
48 lines (44 loc) · 1.22 KB
/
AddWindow.java
File metadata and controls
48 lines (44 loc) · 1.22 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
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
public class AddWindow {
@FXML public javafx.scene.control.Button addButton;
@FXML private TextField TitleField;
@FXML private TextField DateField;
@FXML private TextArea DescArea;
@FXML public ChoiceBox<String> choice;
public boolean OkClicked=false;
@FXML protected void AddButton(ActionEvent event)
{
OkClicked=true;
Stage stage=(Stage) addButton.getScene().getWindow();
stage.close();
}
Kanban function()
{
Kanban b=new Kanban(TitleField.getText(),DateField.getText(),DescArea.getText(),choice.getValue());
return b;
}
void setTitleText(String a)
{
TitleField.setText(a);
}
void setDateText(String a)
{
DateField.setText(a);
}
void setDescText(String a)
{
DescArea.setText(a);
}
void setChoiceValue(String a)
{
choice.setValue(a);
}
}