1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.xnap.plugin.gift.action;
21
22 import java.awt.event.ActionEvent;
23
24 import javax.swing.AbstractAction;
25 import javax.swing.Action;
26
27 import org.xnap.XNap;
28 import org.xnap.gui.util.IconHelper;
29 import org.xnap.plugin.gift.GiFTPlugin;
30
31 public class DisconnectFromGiFTAction extends AbstractAction
32 {
33
34 public DisconnectFromGiFTAction()
35 {
36 putValue(Action.NAME, XNap.tr("Disconnect"));
37 putValue(Action.SHORT_DESCRIPTION,
38 XNap.tr("Disconnect from giFT Server."));
39 putValue(IconHelper.XNAP_ICON, "connect_no.png");
40 setEnabled(false);
41 }
42
43 public void actionPerformed(ActionEvent event)
44 {
45 GiFTPlugin.getInstance().getDaemon().stop(false);
46 }
47
48 }