-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeleteObserver.java
More file actions
43 lines (32 loc) · 971 Bytes
/
DeleteObserver.java
File metadata and controls
43 lines (32 loc) · 971 Bytes
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
import javax.swing.JDialog;
import javax.swing.JLabel;
public class DeleteObserver implements Observer{
private Subject deleteControl;
public DeleteObserver(Subject deleteControl)
{
this.deleteControl=deleteControl;
this.deleteControl.registerObserver(this);
}
@Override
public void update(Performance Perform) {
// TODO Auto-generated method stub
int index = DBHelper.getInstance().getPerforms().indexOf(Perform);
DBHelper.getInstance().getHost().getPerformanceList().remove(index);
JDialog a=new JDialog();
a.add(new JLabel("입력이 완료 되었습니다."));
a.setSize(300,300);
a.setVisible(true);
}
@Override
public void update(Performance Perform, Performance previous) {
// TODO Auto-generated method stub
}
@Override
public void fail() {
// TODO Auto-generated method stub
JDialog a=new JDialog();
a.add(new JLabel("입력이 실패되었습니다.."));
a.setSize(300,300);
a.setVisible(true);
}
}