1 7 8 package org.gjt.jclasslib.browser.detail.attributes.code; 9 10 import org.gjt.jclasslib.browser.BrowserServices; 11 import org.gjt.jclasslib.browser.detail.FixedListDetailPane; 12 import org.gjt.jclasslib.structures.attributes.CodeAttribute; 13 import org.gjt.jclasslib.util.ExtendedJLabel; 14 15 import javax.swing.tree.TreePath ; 16 17 24 public class MiscDetailPane extends FixedListDetailPane { 25 26 28 private ExtendedJLabel lblMaxStack; 29 private ExtendedJLabel lblMaxLocals; 30 private ExtendedJLabel lblCodeLength; 31 32 36 public MiscDetailPane(BrowserServices services) { 37 super(services); 38 } 39 40 protected void setupLabels() { 41 42 addDetailPaneEntry(normalLabel("Maximum stack depth:"), 43 lblMaxStack = highlightLabel()); 44 45 addDetailPaneEntry(normalLabel("Maximum local variables:"), 46 lblMaxLocals = highlightLabel()); 47 48 addDetailPaneEntry(normalLabel("Code length:"), 49 lblCodeLength = highlightLabel()); 50 } 51 52 public void show(TreePath treePath) { 53 54 CodeAttribute attribute = (CodeAttribute)findAttribute(treePath); 55 56 lblMaxStack.setText(attribute.getMaxStack()); 57 lblMaxLocals.setText(attribute.getMaxLocals()); 58 lblCodeLength.setText(attribute.getCode().length); 59 60 super.show(treePath); 61 } 62 63 } 64 65 | Popular Tags |