1 28 29 package org.objectweb.util.explorer.plugin.java.map; 30 import java.util.Map ; 31 32 import org.objectweb.util.explorer.api.MenuItem; 33 import org.objectweb.util.explorer.api.MenuItemTreeView; 34 import org.objectweb.util.explorer.api.TreeView; 35 36 44 public class MapRemoveEntryAction 45 implements MenuItem 46 { 47 48 54 60 66 72 75 public int getStatus(TreeView treeView) 76 { 77 return MenuItem.ENABLED_STATUS; 78 } 79 80 83 public void actionPerformed(MenuItemTreeView treeView) 84 throws Exception 85 { 86 Map map = (Map )treeView.getParentObject(); 88 89 Object objectToRemove = treeView.getSelectedEntry().getName(); 91 92 map.remove(objectToRemove); 94 } 95 96 } | Popular Tags |