1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.xnap.gui.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.XNapFrame;
29 import org.xnap.gui.plugin.PluginDialog;
30 import org.xnap.gui.util.IconHelper;
31
32 /***
33 * Provides an action that shows the plugin dialog.
34 */
35 public class PluginDialogAction extends AbstractAction
36 {
37
38
39
40
41
42
43
44 public PluginDialogAction()
45 {
46 putValue(Action.NAME, XNap.tr("Install Plugins") + "...");
47 putValue(IconHelper.XNAP_ICON, "package.png");
48 putValue(Action.SHORT_DESCRIPTION, XNap.tr("Shows the plugin dialog."));
49 }
50
51
52
53 public void actionPerformed(ActionEvent event)
54 {
55 PluginDialog.showDialog(XNapFrame.getInstance());
56 }
57
58 public boolean equals(Object o)
59 {
60 return (o instanceof PluginDialogAction);
61 }
62
63 }