Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateObserver.java
More file actions
Latest commit
42 lines (34 loc) · 1.05 KB
/
Copy pathUpdateObserver.java
File metadata and controls
42 lines (34 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
importjavax.swing.JDialog;
importjavax.swing.JLabel;
publicclassUpdateObserverimplementsObserver {
privateSubjectupdateControl;
publicUpdateObserver(SubjectupdateObserver)
{
this.updateControl=updateObserver;
updateControl.registerObserver(this);
}
@Override
publicvoidupdate(PerformancePerform) {
// TODO Auto-generated method stub
}
@Override
publicvoidfail() {
// TODO Auto-generated method stub
JDialoga=newJDialog();
a.add(newJLabel("입력이 실패되었습니다.."));
a.setSize(300,300);
a.setVisible(true);
}
@Override
publicvoidupdate(PerformancePerform, Performanceprevious) {
// TODO Auto-generated method stub
intindex = DBHelper.getInstance().getPerforms().indexOf(previous);
DBHelper.getInstance().getPerforms().set(index, Perform);
DBHelper.getInstance().getHost().getPerformanceList().set(index, Perform.getName());
JDialoga=newJDialog();
System.out.println("입력 완료");
a.add(newJLabel("입력이 완료 되었습니다."));
a.setSize(300,300);
a.setVisible(true);
}
}