KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > ide > avk > report > view > ReportAction


1 package org.netbeans.modules.j2ee.sun.ide.avk.report.view;
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 Report component.
12  * @author bshankar@sun.com
13  */

14 public class ReportAction extends AbstractAction JavaDoc {
15     
16     
17     TopComponent win;
18     
19     public ReportAction() {
20         super(NbBundle.getMessage(ReportAction.class, "CTL_ReportAction"));
21         win = ReportTopComponent.findInstance();
22 // putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(ReportTopComponent.ICON_PATH, true)));
23
}
24     
25     public void actionPerformed(ActionEvent JavaDoc evt) {
26         win.open();
27         win.requestActive();
28     }
29     
30     public void repaint() {
31         win.repaint();
32     }
33     
34     public boolean isUIClosed() {
35         return !win.isOpened();
36     }
37 }
38
Popular Tags