class LogEntradaTipoTableRender extends DefaultTableRenderer {
public Component getTableCellRendererComponent(JTable table, Object value//
, boolean isSelected, boolean hasFocus, int row, int column) {
JLabel comp = (JLabel)super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
SVNLogEntradaTipo entradaTipo = (SVNLogEntradaTipo)value;
Color color = entradaTipo.getColor();
if( color != null) {
comp.setBackground( color );
}
else if(!isSelected){
comp.setBackground( null );
}
comp.setText(entradaTipo.getClave());
comp.setHorizontalAlignment(SwingConstants.CENTER);
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(comp, BorderLayout.CENTER);
panel.setToolTipText(entradaTipo.getNombre());
return panel;
}