1 26 27 package org.objectweb.util.browser.plugin.java.map; 28 29 import org.objectweb.util.browser.api.MenuItem; 30 import org.objectweb.util.browser.api.MenuItemTreeView; 31 import org.objectweb.util.browser.api.TreeView; 32 33 43 public class MapClearAction 44 implements MenuItem 45 { 46 47 53 59 65 71 74 public int getStatus(TreeView treeView) 75 { 76 java.util.Map map = (java.util.Map )treeView.getSelectedObject(); 78 79 if (map.size()>0) 81 return MenuItem.ENABLED_STATUS; 82 return MenuItem.DISABLED_STATUS; 83 } 84 85 88 public void actionPerformed(MenuItemTreeView treeView) 89 throws Exception 90 { 91 java.util.Map map = (java.util.Map )treeView.getSelectedObject(); 93 94 map.clear(); 96 } 97 98 } | Popular Tags |