Go to the documentation of this file.
19package org.sleuthkit.autopsy.guiutils;
21import java.awt.Component;
22import java.lang.reflect.InvocationTargetException;
23import javax.swing.ImageIcon;
24import javax.swing.JTable;
25import static javax.swing.SwingConstants.CENTER;
26import org.openide.nodes.Node;
27import org.openide.util.ImageUtilities;
28import org.openide.util.NbBundle.Messages;
29import org.sleuthkit.autopsy.datamodel.NodeProperty;
39 static final ImageIcon OK_ICON =
new ImageIcon(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/tick.png",
false));
40 static final ImageIcon WARNING_ICON =
new ImageIcon(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/warning16.png",
false));
41 static final ImageIcon ERROR_ICON =
new ImageIcon(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/cross-script.png",
false));
44 "StatusIconCellRenderer.tooltiptext.ok=OK",
45 "StatusIconCellRenderer.tooltiptext.warning=A warning occurred",
46 "StatusIconCellRenderer.tooltiptext.error=An error occurred"
50 setHorizontalAlignment(CENTER);
51 Object switchValue =
null;
55 switchValue = ((Node.Property) value).getValue();
56 }
catch (IllegalAccessException | InvocationTargetException ex) {
63 if ((switchValue instanceof
Status)) {
64 switch ((
Status) switchValue) {
67 setToolTipText(org.openide.util.NbBundle.getMessage(
StatusIconCellRenderer.class,
"StatusIconCellRenderer.tooltiptext.ok"));
70 setIcon(WARNING_ICON);
71 setToolTipText(org.openide.util.NbBundle.getMessage(
StatusIconCellRenderer.class,
"StatusIconCellRenderer.tooltiptext.warning"));
75 setToolTipText(org.openide.util.NbBundle.getMessage(
StatusIconCellRenderer.class,
"StatusIconCellRenderer.tooltiptext.error"));
void grayCellIfTableNotEnabled(JTable table, boolean isSelected)
Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
static final long serialVersionUID
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.