1 19 20 21 package org.netbeans.modules.form.actions; 22 23 24 import java.awt.event.ActionEvent ; 25 import javax.swing.AbstractAction ; 26 import javax.swing.ImageIcon ; 27 28 import org.netbeans.modules.form.ComponentInspector; 29 30 import org.openide.util.NbBundle; 31 import org.openide.util.Utilities; 32 33 34 38 public class InspectorAction extends AbstractAction { 39 40 public InspectorAction() { 41 putValue(NAME, NbBundle.getMessage(InspectorAction.class, "CTL_InspectorAction")); 42 putValue(SMALL_ICON, new ImageIcon ( 43 Utilities.loadImage("org/netbeans/modules/form/resources/inspector.png"))); } 45 46 47 48 public void actionPerformed(ActionEvent evt) { 49 ComponentInspector inspector = ComponentInspector.getInstance(); 51 inspector.open(); 52 inspector.requestActive(); 53 } 54 55 } 56 57 | Popular Tags |