result = _delegate.getTableCellRendererComponent(_table, value, isSelected, hasFocus, row, column);
assert result instanceof JLabel;
}
// alignment is applied to all labels or panels (with flowlayout)
Alignment alignment = _alignmentOverrides.get(column);
if (alignment == null) {
alignment = Alignment.LEFT;
}
// set alignment
if (value instanceof JPanel) {
final LayoutManager layout = ((JPanel) value).getLayout();
if (layout instanceof FlowLayout) {
final FlowLayout flowLayout = (FlowLayout) layout;
flowLayout.setAlignment(alignment.getFlowLayoutAlignment());
}
} else if (result instanceof JLabel) {
final JLabel label = (JLabel) result;
label.setHorizontalAlignment(alignment.getSwingContstantsAlignment());
WidgetUtils.setAppropriateFont(label);
}
return result;