KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > jclasslib > browser > detail > elementvalues > ConstElementValueEntryDetailPane


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 package org.gjt.jclasslib.browser.detail.elementvalues;
8
9 import org.gjt.jclasslib.browser.BrowserServices;
10 import org.gjt.jclasslib.browser.BrowserTreeNode;
11 import org.gjt.jclasslib.browser.detail.FixedListDetailPane;
12 import org.gjt.jclasslib.structures.elementvalues.ConstElementValue;
13 import org.gjt.jclasslib.util.ExtendedJLabel;
14
15 import javax.swing.tree.TreePath JavaDoc;
16
17 /**
18  * Class for showing element value entry of type Constant.
19  *
20  * @author <a HREF="mailto:vitor.carreira@gmail.com">Vitor Carreira</a>
21  * @version $Revision: 1.1 $ $Date: 2004/12/28 13:04:30 $
22  */

23 public class ConstElementValueEntryDetailPane extends FixedListDetailPane {
24
25     private ExtendedJLabel lblIndex;
26     private ExtendedJLabel lblIndexVerbose;
27
28     public ConstElementValueEntryDetailPane(BrowserServices services) {
29         super(services);
30     }
31
32     protected void setupLabels() {
33
34         addDetailPaneEntry(normalLabel("Constant value:"),
35                 lblIndex = linkLabel(),
36                 lblIndexVerbose = highlightLabel());
37     }
38
39     public void show(TreePath JavaDoc treePath) {
40         ConstElementValue ceve = (ConstElementValue)
41                 ((BrowserTreeNode)treePath.getLastPathComponent()).getElement();
42
43         constantPoolHyperlink(lblIndex,
44                 lblIndexVerbose,
45                 ceve.getConstValueIndex());
46
47         super.show(treePath);
48     }
49 }
50
Popular Tags