KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > test > editor > app > gui > actions > TreeNewType


1 /*
2  * TreeNewType.java
3  *
4  * Created on November 14, 2002, 3:54 PM
5  */

6
7 package org.netbeans.test.editor.app.gui.actions;
8
9 import org.netbeans.test.editor.app.core.TestGroup;
10 import org.netbeans.test.editor.app.gui.tree.TestNodeDelegate;
11
12 /**
13  *
14  * @author eh103527
15  */

16 public abstract class TreeNewType extends TreeNodeAction {
17     
18     /** Creates a new instance of TreeNewType */
19     public TreeNewType() {
20     }
21     
22     
23     public boolean enable(TestNodeDelegate[] activatedNodes) {
24         return true;
25     }
26     
27     public void performAction(TestNodeDelegate[] activatedNodes) {
28         if (activatedNodes.length == 1) {
29             create((TestGroup)(activatedNodes[0].getTestNode()));
30         }
31     }
32     
33     public abstract void create(TestGroup group);
34 }
35
Popular Tags