1 9 10 package org.netbeans.modules.web.jsf.navigation.graph.actions; 11 12 import java.awt.event.ActionEvent ; 13 import javax.swing.AbstractAction ; 14 import javax.swing.Action ; 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 24 public class ConnectToAction extends AbstractAction implements ContextAwareAction { 25 26 PageFlowScene pfs; 27 28 29 public ConnectToAction() { 30 putValue("NAME", getDisplayName()); 31 } 32 33 37 protected String getDisplayName() { 38 return NbBundle.getMessage(AddPageAction.class, "LBL_AddPage"); 39 } 40 41 public void actionPerformed(ActionEvent e) { 42 System.out.println("\nConnecting To Selected"); 43 System.out.println("PageFlowScene: " + pfs); 44 } 45 46 public Action createContextAwareInstance(Lookup lookup) { 47 pfs = lookup.lookup(PageFlowScene.class); 48 49 return this; 50 } 52 53 } 54 | Popular Tags |