1 28 29 package org.objectweb.util.browser.plugins.fractal.menu; 30 31 import org.objectweb.fractal.api.Interface; 32 import org.objectweb.util.browser.api.DropAction; 33 import org.objectweb.util.browser.api.DropTreeView; 34 import org.objectweb.util.browser.plugins.fractal.FcBrowser; 35 import org.objectweb.util.browser.plugins.fractal.context.ClientInterfaceWrapper; 36 37 42 public class BindOnDropAction 43 implements DropAction 44 { 45 51 57 63 69 72 public void execute(DropTreeView dropTreeView) throws Exception { 73 if (dropTreeView!=null) { 74 try { 75 Interface serverInterface = (Interface) dropTreeView.getDragSourceObject(); 76 ClientInterfaceWrapper clientWrapper = (ClientInterfaceWrapper) dropTreeView.getSelectedObject(); 77 Interface clientInterface = clientWrapper.getItf(); 78 FcBrowser.getBindingController(clientInterface.getFcItfOwner()).bindFc(clientInterface.getFcItfName(),serverInterface); 79 } catch(ClassCastException e) { 80 throw new Exception ("You must select an interface!"); 81 } 82 } 83 } 84 } | Popular Tags |