mPanel.add(mIconLabel, cc.xy(3, 2));
mPanel.add(mNoteLabel, cc.xy(1, 4));
}
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Component def = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (value instanceof ReminderListItem) {
final ReminderListItem listItem = (ReminderListItem) value;
Integer minutes = listItem.getMinutes();
mTextLabel.setText(ReminderFrame.getStringForMinutes(minutes.intValue()));
mTextLabel.setOpaque(def.isOpaque());
mTextLabel.setForeground(def.getForeground());
mTextLabel.setBackground(def.getBackground());
mPanel.setOpaque(def.isOpaque());
mPanel.setBackground(def.getBackground());
final String comment = listItem.getComment();
if (comment != null && !comment.isEmpty()) {
mNoteLabel.setVisible(true);
mNoteLabel.setText(mLocalizer.msg("note", "Note: {0}", comment));
mNoteLabel.setOpaque(def.isOpaque());
mNoteLabel.setForeground(def.getForeground());
mNoteLabel.setBackground(def.getBackground());
} else {
mNoteLabel.setVisible(false);
}
return mPanel;