1 7 package org.gjt.jclasslib.browser.detail.attributes; 8 9 import org.gjt.jclasslib.browser.BrowserServices; 10 import org.gjt.jclasslib.browser.detail.FixedListDetailPane; 11 import org.gjt.jclasslib.structures.attributes.RuntimeAnnotationsAttribute; 12 import org.gjt.jclasslib.util.ExtendedJLabel; 13 14 import javax.swing.tree.TreePath ; 15 16 23 public class RuntimeAnnotationsAttributeDetailPane extends FixedListDetailPane { 24 25 private ExtendedJLabel lblAnnotationEntries; 26 27 32 public RuntimeAnnotationsAttributeDetailPane(BrowserServices services) { 33 super(services); 34 } 35 36 37 protected void setupLabels() { 38 addDetailPaneEntry(normalLabel("Number of annotations:"), 39 lblAnnotationEntries = highlightLabel()); 40 } 41 42 public void show(TreePath treePath) { 43 RuntimeAnnotationsAttribute raa = 44 (RuntimeAnnotationsAttribute)findAttribute(treePath); 45 46 lblAnnotationEntries.setText(String.valueOf(raa.getRuntimeAnnotations().length)); 47 48 super.show(treePath); 49 50 } 51 } 52 | Popular Tags |