1 7 8 package org.gjt.jclasslib.browser.detail.attributes; 9 10 import org.gjt.jclasslib.browser.BrowserServices; 11 import org.gjt.jclasslib.browser.detail.FixedListDetailPane; 12 import org.gjt.jclasslib.structures.AttributeInfo; 13 import org.gjt.jclasslib.util.ExtendedJLabel; 14 15 import javax.swing.tree.TreePath ; 16 17 23 public class GenericAttributeDetailPane extends FixedListDetailPane { 24 25 27 private ExtendedJLabel lblNameIndex; 28 private ExtendedJLabel lblLength; 29 30 34 public GenericAttributeDetailPane(BrowserServices services) { 35 super(services); 36 } 37 38 protected void setupLabels() { 39 40 addDetailPaneEntry(normalLabel("Attribute name index:"), 41 lblNameIndex = linkLabel(), 42 null); 43 44 addDetailPaneEntry(normalLabel("Attribute length:"), 45 lblLength = highlightLabel()); 46 47 } 48 49 public void show(TreePath treePath) { 50 51 AttributeInfo attribute = findAttribute(treePath); 52 53 constantPoolHyperlink(lblNameIndex, 54 null, 55 attribute.getAttributeNameIndex()); 56 57 lblLength.setText(attribute.getAttributeLength()); 58 59 super.show(treePath); 60 } 61 62 } 63 64 | Popular Tags |