1 26 27 package org.objectweb.util.explorer.plugin.java; 28 29 import java.util.Collection ; 30 31 import org.objectweb.util.explorer.api.MenuItem; 32 import org.objectweb.util.explorer.api.MenuItemTreeView; 33 import org.objectweb.util.explorer.api.TreeView; 34 35 36 44 public class CollectionRemoveObjectAction 45 implements MenuItem { 46 47 53 59 65 71 74 public int 75 getStatus(TreeView treeView) { 76 return MenuItem.ENABLED_STATUS; 77 } 78 79 82 public void 83 actionPerformed(MenuItemTreeView treeView) 84 throws Exception { 85 Collection collection = (Collection )treeView.getParentObject(); 86 Object objectToRemove = treeView.getSelectedObject(); 87 collection.remove(objectToRemove); 88 } 89 90 } | Popular Tags |