in jetbrains-core/src/software/aws/toolkits/jetbrains/utils/ui/UiUtils.kt [204:226]
override fun getTableCellRendererComponent(table: JTable?, value: Any?, isSelected: Boolean, hasFocus: Boolean, row: Int, column: Int): Component {
if (table == null) {
return this
}
textArea.lineWrap = (wrapOnSelection && isSelected) || (wrapOnToggle && wrap)
val text = (value as? String) ?: ""
textArea.text = if (truncateAfterChars != null) {
text.take(truncateAfterChars)
} else {
text
}
textArea.setSelectionHighlighting(table, isSelected)
setSize(table.columnModel.getColumn(column).width, preferredSize.height)
if (table.getRowHeight(row) != preferredSize.height) {
table.setRowHeight(row, preferredSize.height)
}
textArea.speedSearchHighlighter(table)
return this
}