1 26 27 package org.objectweb.util.browser.plugin.java.map; 28 import java.util.Map ; 29 30 import org.objectweb.util.browser.api.MenuItem; 31 import org.objectweb.util.browser.api.MenuItemTreeView; 32 import org.objectweb.util.browser.api.TreeView; 33 34 42 public class MapRemoveEntryAction 43 implements MenuItem 44 { 45 46 52 58 64 70 73 public int getStatus(TreeView treeView) 74 { 75 return MenuItem.ENABLED_STATUS; 76 } 77 78 81 public void actionPerformed(MenuItemTreeView treeView) 82 throws Exception 83 { 84 Map map = (Map )treeView.getParentObject(); 86 87 Object objectToRemove = treeView.getSelectedEntry().getName(); 89 90 map.remove(objectToRemove); 92 } 93 94 } | Popular Tags |