1 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.EnumElementValue; 13 import org.gjt.jclasslib.util.ExtendedJLabel; 14 15 import javax.swing.tree.TreePath ; 16 17 23 public class EnumElementValueEntryDetailPane extends FixedListDetailPane { 24 25 private ExtendedJLabel lblTypeNameIndex; 26 private ExtendedJLabel lblTypeNameIndexVerbose; 27 private ExtendedJLabel lblConstNameIndex; 28 private ExtendedJLabel lblConstNameIndexVerbose; 29 30 public EnumElementValueEntryDetailPane(BrowserServices services) { 31 super(services); 32 } 33 34 protected void setupLabels() { 35 addDetailPaneEntry(normalLabel("Type name:"), 36 lblTypeNameIndex = linkLabel(), 37 lblTypeNameIndexVerbose = highlightLabel()); 38 addDetailPaneEntry(normalLabel("Const name:"), 39 lblConstNameIndex = linkLabel(), 40 lblConstNameIndexVerbose = highlightLabel()); 41 } 42 43 public void show(TreePath treePath) { 44 EnumElementValue eeve = (EnumElementValue) 45 ((BrowserTreeNode)treePath.getLastPathComponent()).getElement(); 46 47 constantPoolHyperlink(lblTypeNameIndex, 48 lblTypeNameIndexVerbose, 49 eeve.getTypeNameIndex()); 50 51 constantPoolHyperlink(lblConstNameIndex, 52 lblConstNameIndexVerbose, 53 eeve.getConstNameIndex()); 54 55 super.show(treePath); 56 } 57 58 } 59 | Popular Tags |