1 26 package org.objectweb.util.browser.plugin.java; 27 28 import javax.swing.JOptionPane ; 29 30 import org.objectweb.util.browser.api.MenuItem; 31 import org.objectweb.util.browser.api.MenuItemTreeView; 32 import org.objectweb.util.browser.api.Tree; 33 import org.objectweb.util.browser.api.TreeView; 34 35 43 public class ContextSizeAction 44 implements MenuItem 45 { 46 47 50 public int getStatus(TreeView treeView) { 51 return MenuItem.ENABLED_STATUS; 52 } 53 54 57 public void actionPerformed(MenuItemTreeView treeView) 58 throws Exception { 59 Tree tree = treeView.getTree(); 60 JOptionPane.showMessageDialog(null,"Size of the initial context: " + tree.getInitialContextSize()); 61 } 62 63 } 64 | Popular Tags |