@Override
public Integer getCellFontTextAttribute() {
if (isSelectionContainsEmptyCells()) {
return null;
}
ComponentTableModel tableModel = ComponentTableModel.class.cast(model);
if (isSingleCellSelection()) {
AbstractComponent component = (AbstractComponent) model.getStoredValueAt(table.getSelectedRows()[0], table.getSelectedColumns()[0]);
String id = tableModel.getKey(component);
TableCellSettings settings = tableModel.getCellSettings(id);
return Integer.valueOf(settings.getTextAttributeUnderline());
}
Integer defaultFontTextAttribute = TableFormattingConstants.UNDERLINE_OFF;
Integer commonCellFontTextAttribute = null;
for (Integer row : table.getSelectedRows()) {
for (Integer col : table.getSelectedColumns()) {
AbstractComponent component = (AbstractComponent) model.getStoredValueAt(row, col);
String id = tableModel.getKey(component);
TableCellSettings settings = tableModel.getCellSettings(id);
Integer aCellFontTextAttribute = settings.getTextAttributeUnderline();
// determine default decimal places
if (aCellFontTextAttribute == null) {
aCellFontTextAttribute = defaultFontTextAttribute;
}