1 26 package org.objectweb.util.browser.plugin.java; 27 28 import org.objectweb.util.browser.api.DropAction; 29 import org.objectweb.util.browser.api.DropTreeView; 30 import org.objectweb.util.browser.api.Entry; 31 import org.objectweb.util.browser.core.api.ContextContainer; 32 33 41 public class MoveToContext 42 implements DropAction 43 { 44 45 51 57 63 69 72 public void execute(DropTreeView dropTreeView) throws Exception { 73 if(dropTreeView!=null){ 74 Entry entryToAdd = dropTreeView.getDragSourceEntry(); 75 ContextContainer cc = (ContextContainer)dropTreeView.getSelectedObject(); 76 if(entryToAdd!=null && cc!=null){ 77 cc.addEntry(entryToAdd.getName().toString(),dropTreeView.getDragSourceObject()); 78 dropTreeView.getTree().removeEntry(entryToAdd.getName()); 79 } 80 } 81 } 82 83 } 84 | Popular Tags |