1 7 package org.gjt.jclasslib.browser.detail; 8 9 import org.gjt.jclasslib.browser.BrowserServices; 10 import org.gjt.jclasslib.browser.BrowserTreeNode; 11 import org.gjt.jclasslib.structures.elementvalues.ArrayElementValue; 12 import org.gjt.jclasslib.structures.elementvalues.ElementValue; 13 import org.gjt.jclasslib.util.ExtendedJLabel; 14 15 import javax.swing.tree.TreePath ; 16 17 23 public class ArrayElementValueDetailPane extends FixedListDetailPane { 24 25 private ExtendedJLabel lblTag; 26 private ExtendedJLabel lblTagVerbose; 27 28 private ExtendedJLabel lblValueCount; 29 30 public ArrayElementValueDetailPane(BrowserServices services) { 31 super(services); 32 } 33 34 protected void setupLabels() { 35 addDetailPaneEntry(normalLabel("Tag:"), 36 lblTag = highlightLabel(), 37 lblTagVerbose = highlightLabel()); 38 39 addDetailPaneEntry(normalLabel("Number of values:"), 40 lblValueCount = highlightLabel()); 41 } 42 43 public void show(TreePath treePath) { 44 ArrayElementValue aev = (ArrayElementValue) 45 ((BrowserTreeNode)treePath.getLastPathComponent()).getElement(); 46 47 lblTag.setText(String.valueOf((char)aev.getTag())); 48 lblTagVerbose.setText("<" + ElementValue.getTagDescription(aev.getTag()) + ">"); 49 50 lblValueCount.setText(String.valueOf(aev.getElementValueEntries().length)); 51 52 super.show(treePath); 53 } 54 55 56 } 57 | Popular Tags |