KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > gsf > tools > lucene > IndexBrowserAction


1 package org.netbeans.modules.gsf.tools.lucene;
2
3 import java.awt.event.ActionEvent JavaDoc;
4 import javax.swing.AbstractAction JavaDoc;
5 import javax.swing.ImageIcon JavaDoc;
6 import org.openide.util.NbBundle;
7 import org.openide.util.Utilities;
8 import org.openide.windows.TopComponent;
9
10 /**
11  * Action which shows IndexBrowser component.
12  */

13 public class IndexBrowserAction extends AbstractAction JavaDoc {
14     
15     public IndexBrowserAction() {
16         super(NbBundle.getMessage(IndexBrowserAction.class, "CTL_IndexBrowserAction"));
17         // putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(IndexBrowserTopComponent.ICON_PATH, true)));
18
}
19     
20     public void actionPerformed(ActionEvent JavaDoc evt) {
21         TopComponent win = IndexBrowserTopComponent.findInstance();
22         win.open();
23         win.requestActive();
24     }
25     
26 }
27
Popular Tags