19 package org.sleuthkit.autopsy.guiutils;
21 import java.awt.Component;
22 import javax.swing.ImageIcon;
23 import javax.swing.JTable;
24 import static javax.swing.SwingConstants.CENTER;
25 import org.openide.util.ImageUtilities;
26 import org.openide.util.NbBundle.Messages;
36 static final ImageIcon OK_ICON =
new ImageIcon(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/tick.png",
false));
37 static final ImageIcon WARNING_ICON =
new ImageIcon(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/warning16.png",
false));
38 static final ImageIcon ERROR_ICON =
new ImageIcon(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/cross-script.png",
false));
41 "StatusIconCellRenderer.tooltiptext.ok=OK",
42 "StatusIconCellRenderer.tooltiptext.warning=A warning occurred",
43 "StatusIconCellRenderer.tooltiptext.error=An error occurred"
47 setHorizontalAlignment(CENTER);
48 if ((value instanceof
Status)) {
49 switch((Status) value) {
52 setToolTipText(
org.openide.util.NbBundle.getMessage(
StatusIconCellRenderer.class,
"StatusIconCellRenderer.tooltiptext.ok"));
55 setIcon(WARNING_ICON);
56 setToolTipText(
org.openide.util.NbBundle.getMessage(
StatusIconCellRenderer.class,
"StatusIconCellRenderer.tooltiptext.warning"));
60 setToolTipText(
org.openide.util.NbBundle.getMessage(
StatusIconCellRenderer.class,
"StatusIconCellRenderer.tooltiptext.error"));
Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
static final long serialVersionUID
void grayCellIfTableNotEnabled(JTable table, boolean isSelected)