take into account isEnabled()

This commit is contained in:
Eugene Kudelevsky
2011-10-27 16:36:59 +04:00
parent a74fa882d9
commit a0b9ef6c9b
@@ -33,7 +33,12 @@ public class BooleanCellRenderer extends DefaultTableCellRenderer {
int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (value instanceof Boolean) {
setText((Boolean)value ? "yes" : "<html><font color='red'>no</font></html>");
if (table.isEnabled()) {
setText((Boolean)value ? "yes" : "<html><font color='red'>no</font></html>");
}
else {
setText((Boolean)value ? "yes" : "no");
}
}
return this;
}