1 26 package org.objectweb.openccm.explorer.Components; 27 28 import org.objectweb.util.explorer.api.MenuItem; 29 import org.objectweb.util.explorer.api.MenuItemTreeView; 30 import org.objectweb.util.explorer.api.TreeView; 31 import org.omg.Components.CCMObject; 32 import org.omg.Components.ReceptacleDescription; 33 import org.omg.Components.ConnectionDescription; 34 35 43 public class DisconnectAction 44 implements MenuItem 45 { 46 47 50 public int getStatus(TreeView arg0){ 51 return MenuItem.ENABLED_STATUS; 52 } 53 54 57 public void actionPerformed(MenuItemTreeView e) throws Exception { 58 ConnectionContainer cc = (ConnectionContainer) e.getSelectedObject(); 59 CCMObject component = cc.getComponent(); 60 ReceptacleDescription receptacle = cc.getReceptacle(); 61 ConnectionDescription connection = cc.getConnection(); 62 component.disconnect(receptacle.name, connection.ck); 63 } 64 65 } 66 | Popular Tags |