19 package org.sleuthkit.autopsy.communications.relationships;
21 import java.awt.Component;
22 import java.beans.FeatureDescriptor;
23 import java.lang.reflect.InvocationTargetException;
24 import java.util.logging.Level;
25 import javax.swing.JTable;
26 import javax.swing.table.DefaultTableCellRenderer;
27 import org.openide.nodes.Node;
34 final class NodeTableCellRenderer
extends DefaultTableCellRenderer {
36 private static final long serialVersionUID = 1L;
38 private static final Logger logger = Logger.getLogger(NodeTableCellRenderer.class.getName());
41 public Component getTableCellRendererComponent(JTable table,
49 Object theRealValue = value;
50 if (value instanceof NodeProperty) {
51 descr = ((FeatureDescriptor) value).getShortDescription();
53 theRealValue = ((Node.Property<?>) value).
getValue();
54 }
catch (IllegalAccessException | InvocationTargetException ex) {
55 logger.log(Level.WARNING,
"Unable to get NodeProperty cell value.");
59 super.getTableCellRendererComponent(table, theRealValue, isSelected, hasFocus, row, column);
61 setToolTipText(descr);