source: src/main/java/genius/gui/deadline/DeadlineModel.java@ 227

Last change on this file since 227 was 199, checked in by Tim Baarslag, 5 years ago

60s timeout default

File size: 678 bytes
Line 
1package genius.gui.deadline;
2
3import genius.core.Deadline;
4import genius.core.DeadlineType;
5import genius.core.listener.DefaultListenable;
6
7/**
8 * Stores the selected deadline type and can notify about changes.
9 */
10public class DeadlineModel extends DefaultListenable<DeadlineModel> {
11
12 // default values.
13 private Integer value = 60;
14 private DeadlineType type = DeadlineType.ROUND;
15
16 public void setValue(Integer value) {
17 this.value = value;
18 notifyChange(null);
19 }
20
21 public void setType(DeadlineType type) {
22 this.type = type;
23 notifyChange(null);
24 }
25
26 /**
27 * @return the current deadline
28 */
29 public Deadline getDeadline() {
30 return new Deadline(value, type);
31 }
32
33}
Note: See TracBrowser for help on using the repository browser.