01: /*
02: This library is free software; you can redistribute it and/or
03: modify it under the terms of the GNU General Public
04: License as published by the Free Software Foundation; either
05: version 2 of the license, or (at your option) any later version.
06: */
07: package org.gjt.jclasslib.browser.detail.attributes;
08:
09: import org.gjt.jclasslib.browser.BrowserServices;
10: import org.gjt.jclasslib.browser.detail.FixedListDetailPane;
11: import org.gjt.jclasslib.structures.attributes.SignatureAttribute;
12: import org.gjt.jclasslib.util.ExtendedJLabel;
13:
14: import javax.swing.tree.TreePath;
15:
16: /**
17: * Detail pane showing a <tt>Signature</tt> attribute.
18: *
19: * @author <a href="mailto:vitor.carreira@gmail.com">Vitor Carreira</a>
20: * @version $Revision: 1.1 $ $Date: 2004/12/28 13:04:30 $
21: */
22: public class SignatureAttributeDetailPane extends FixedListDetailPane {
23:
24: // Visual components
25: private ExtendedJLabel lblSignature;
26: private ExtendedJLabel lblSignatureVerbose;
27:
28: /**
29: * Constructor.
30: *
31: * @param services the associated browser services.
32: */
33: public SignatureAttributeDetailPane(BrowserServices services) {
34: super (services);
35: }
36:
37: protected void setupLabels() {
38: addDetailPaneEntry(normalLabel("Signature index:"),
39: lblSignature = linkLabel(),
40: lblSignatureVerbose = highlightLabel());
41: }
42:
43: public void show(TreePath treePath) {
44: SignatureAttribute attribute = (SignatureAttribute) findAttribute(treePath);
45: constantPoolHyperlink(lblSignature, lblSignatureVerbose,
46: attribute.getSignatureIndex());
47: super.show(treePath);
48: }
49: }
|