01: /*
02: * This program is free software; you can redistribute it and/or
03: * modify it under the terms of the GNU General Public License
04: * as published by the Free Software Foundation; either version 2
05: * of the License, or (at your option) any later version.
06: *
07: * This program is distributed in the hope that it will be useful,
08: * but WITHOUT ANY WARRANTY; without even the implied warranty of
09: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10: * GNU General Public License for more details.
11:
12: * You should have received a copy of the GNU General Public License
13: * along with this program; if not, write to the Free Software
14: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15: */
16: package net.sf.jftp.gui.tasks;
17:
18: import net.sf.jftp.gui.framework.*;
19: import net.sf.jftp.util.*;
20:
21: import java.awt.*;
22: import java.awt.event.*;
23:
24: public class RemoverQuery extends HFrame implements ActionListener {
25: private String file;
26: private String type;
27: private HButton ok = new HButton("Ok");
28: private HButton cancel = new HButton("Cancel");
29:
30: public RemoverQuery(String file, String type) {
31: this .file = file;
32: this .type = type;
33:
34: setSize(200, 70);
35: setTitle("Really?");
36: setLayout(new FlowLayout());
37: setLocation(150, 150);
38:
39: add(ok);
40: add(cancel);
41:
42: ok.addActionListener(this );
43: cancel.addActionListener(this );
44:
45: setVisible(true);
46: }
47:
48: public void actionPerformed(ActionEvent e) {
49: if (e.getSource() == ok) {
50: AutoRemover armv = new AutoRemover(file, type);
51: this.dispose();
52: } else {
53: this.dispose();
54: }
55: }
56: }
|