KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > jclasslib > browser > detail > InterfaceDetailPane


1 /*
2     This library is free software; you can redistribute it and/or
3     modify it under the terms of the GNU General Public
4     License as published by the Free Software Foundation; either
5     version 2 of the license, or (at your option) any later version.
6 */

7
8 package org.gjt.jclasslib.browser.detail;
9
10 import org.gjt.jclasslib.browser.BrowserServices;
11 import org.gjt.jclasslib.util.ExtendedJLabel;
12
13 import javax.swing.tree.TreePath JavaDoc;
14
15 /**
16     Detail pane showing interface entries.
17  
18     @author <a HREF="mailto:jclasslib@ej-technologies.com">Ingo Kegel</a>
19     @version $Revision: 1.5 $ $Date: 2003/08/18 08:14:22 $
20 */

21 public class InterfaceDetailPane extends FixedListDetailPane {
22
23     // Visual components
24

25     private ExtendedJLabel lblInterface;
26     private ExtendedJLabel lblInterfaceVerbose;
27     
28     /**
29         Constructor.
30         @param services the associated browser services.
31      */

32     public InterfaceDetailPane(BrowserServices services) {
33         super(services);
34     }
35     
36     protected void setupLabels() {
37         
38         addDetailPaneEntry(normalLabel("Interface:"),
39                            lblInterface = linkLabel(),
40                            lblInterfaceVerbose = highlightLabel());
41
42     }
43
44     public void show(TreePath JavaDoc treePath) {
45         
46         int constantPoolIndex = services.getClassFile().getInterfaces()[getIndex(treePath)];
47         
48         constantPoolHyperlink(lblInterface,
49                               lblInterfaceVerbose,
50                               constantPoolIndex);
51         
52         super.show(treePath);
53         
54     }
55     
56 }
57
58
Popular Tags