KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > ruby > rubyproject > IrbAction


1 package org.netbeans.modules.ruby.rubyproject;
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 Irb component.
12  */

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