1 19 20 package org.netbeans.modules.java.navigation.actions; 21 22 import java.awt.event.ActionEvent ; 23 import javax.swing.AbstractAction ; 24 import javax.swing.ImageIcon ; 25 import org.netbeans.modules.java.navigation.JavadocTopComponent; 26 import org.openide.util.NbBundle; 27 import org.openide.util.Utilities; 28 import org.openide.windows.TopComponent; 29 30 35 public class JavadocAction extends AbstractAction { 36 37 public JavadocAction() { 38 super(NbBundle.getMessage(JavadocAction.class, "CTL_JavadocAction")); 39 putValue(SMALL_ICON, new ImageIcon (Utilities.loadImage(JavadocTopComponent.ICON_PATH, true))); 40 } 41 42 public void actionPerformed(ActionEvent evt) { 43 TopComponent win = JavadocTopComponent.findInstance(); 44 win.open(); 45 win.requestActive(); 46 } 47 48 } 49 | Popular Tags |