1 19 package org.netbeans.test.editor.app.gui.actions; 20 21 import org.netbeans.test.editor.app.Main; 22 import org.netbeans.test.editor.app.core.TestNode; 23 import org.netbeans.test.editor.app.gui.PropertiesDialog; 24 import org.netbeans.test.editor.app.gui.tree.TestNodeDelegate; 25 26 31 public class TestPropertiesAction extends TreeNodeAction { 32 33 34 public TestPropertiesAction() { 35 } 36 37 public boolean enable(TestNodeDelegate[] activatedNodes) { 38 if (activatedNodes.length == 1) 39 return true; 40 else 41 return false; 42 } 43 44 public void performAction(TestNodeDelegate[] activatedNodes) { 45 if (activatedNodes != null && activatedNodes.length == 1) { 46 TestNode node=activatedNodes[0].getTestNode(); 47 PropertiesDialog dlg=new PropertiesDialog(Main.frame,node); 48 dlg.show(); 49 } 50 } 51 52 public String getHelpCtx() { 53 return "Shows properties of selected node."; 54 } 55 56 public String getName() { 57 return "Properties"; 58 } 59 60 61 } 62 | Popular Tags |