1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
package net.sf.webphotos.netbeans; |
21 | |
|
22 | |
import java.awt.event.ActionEvent; |
23 | |
import javax.swing.AbstractAction; |
24 | |
import javax.swing.ImageIcon; |
25 | |
import org.openide.awt.ActionID; |
26 | |
import org.openide.awt.ActionReference; |
27 | |
import org.openide.awt.ActionRegistration; |
28 | |
import org.openide.util.ImageUtilities; |
29 | |
import org.openide.util.NbBundle; |
30 | |
import org.openide.util.NbBundle.Messages; |
31 | |
import org.openide.windows.TopComponent; |
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@ActionID(id = "net.sf.webphotos.netbeans.WebPhotosFormAction", category = "Window") |
37 | |
@ActionRegistration(lazy = false, displayName = "#CTL_WebPhotosFormAction") |
38 | |
@ActionReference(path = "Menu/Window", name = "WebPhotosFormAction") |
39 | |
@Messages("CTL_WebPhotosFormAction=WebPhotosForm") |
40 | |
public class WebPhotosFormAction extends AbstractAction { |
41 | |
|
42 | |
public WebPhotosFormAction() { |
43 | 0 | super(NbBundle.getMessage(WebPhotosFormAction.class, "CTL_WebPhotosFormAction")); |
44 | 0 | putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(WebPhotosFormTopComponent.ICON_PATH, true))); |
45 | 0 | } |
46 | |
|
47 | |
@Override |
48 | |
public void actionPerformed(ActionEvent evt) { |
49 | 0 | TopComponent win = WebPhotosFormTopComponent.findInstance(); |
50 | 0 | win.open(); |
51 | 0 | win.requestActive(); |
52 | 0 | } |
53 | |
} |