19 package org.sleuthkit.autopsy.guiutils;
21 import java.awt.Color;
22 import java.awt.Component;
23 import java.text.SimpleDateFormat;
24 import javax.swing.JTable;
25 import static javax.swing.SwingConstants.CENTER;
32 class ShortDateCellRenderer
extends GrayableCellRenderer {
34 private static final long serialVersionUID = 1L;
35 private static final String FORMAT_STRING =
"MM/dd HH:mm";
36 private static final SimpleDateFormat dateFormat =
new SimpleDateFormat(FORMAT_STRING);
38 public ShortDateCellRenderer() {
39 setHorizontalAlignment(CENTER);
43 public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
45 setText(dateFormat.format(value));
void grayCellIfTableNotEnabled(JTable table, boolean isSelected)