KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > jsf > navigation > graph > actions > ConnectToAction


1 /*
2  * ConnectToAction.java
3  *
4  * Created on March 5, 2007, 1:25 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.web.jsf.navigation.graph.actions;
11
12 import java.awt.event.ActionEvent JavaDoc;
13 import javax.swing.AbstractAction JavaDoc;
14 import javax.swing.Action JavaDoc;
15 import org.netbeans.modules.web.jsf.navigation.graph.PageFlowScene;
16 import org.openide.util.ContextAwareAction;
17 import org.openide.util.Lookup;
18 import org.openide.util.NbBundle;
19
20 /**
21  *
22  * @author joelle
23  */

24 public class ConnectToAction extends AbstractAction JavaDoc implements ContextAwareAction {
25     
26     PageFlowScene pfs;
27     
28     /** Creates a new instance of ConnectToAction */
29     public ConnectToAction() {
30         putValue("NAME", getDisplayName());
31     }
32     
33     /**
34      *
35      * @return
36      */

37     protected String JavaDoc getDisplayName() {
38         return NbBundle.getMessage(AddPageAction.class, "LBL_AddPage");
39     }
40
41     public void actionPerformed(ActionEvent JavaDoc e) {
42         System.out.println("\nConnecting To Selected");
43         System.out.println("PageFlowScene: " + pfs);
44     }
45
46     public Action JavaDoc createContextAwareInstance(Lookup lookup) {
47         pfs = lookup.lookup(PageFlowScene.class);
48         
49         return this;
50 // return new ConnectToAction(pfs);
51
}
52     
53 }
54
Popular Tags