1 28 29 package org.objectweb.util.explorer.plugin.java.map; 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 45 public class MapClearAction 46 implements MenuItem 47 { 48 49 55 61 67 73 76 public int getStatus(TreeView treeView) 77 { 78 java.util.Map map = (java.util.Map )treeView.getSelectedObject(); 80 81 if (map.size()>0) 83 return MenuItem.ENABLED_STATUS; 84 return MenuItem.DISABLED_STATUS; 85 } 86 87 90 public void actionPerformed(MenuItemTreeView treeView) 91 throws Exception 92 { 93 java.util.Map map = (java.util.Map )treeView.getSelectedObject(); 95 96 map.clear(); 98 } 99 100 } | Popular Tags |