Component (JTable table, Object value, boolean selected, boolean cellHasFocus, int row, int column) { column = table.convertColumnIndexToModel(column); Property property = (Property)value; Color background = table.getBackground(); Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); boolean tableHasFocus = focusOwner != null && SwingUtilities.isDescendingFrom(focusOwner, table); ColoredTableCellRenderer renderer = property instanceof GroupProperty ? myGroupRenderer : myCellRenderer; renderer.getTableCellRendererComponent(table, value, selected, cellHasFocus, row, column); renderer.setBackground(selected ? UIUtil.getTreeSelectionBackground(tableHasFocus) : background); if (property instanceof GroupProperty) { renderer.setIpad(new Insets(0, 5, 0, 0)); if (column == 0) { renderer.append(property.getName()); } return renderer; } boolean isDefault = true; try { for (PropertiesContainer container : myContainers) { if (!property.showAsDefault(container)) { isDefault = false; break; } } } catch (Exception e) { LOG.debug(e); } renderer.clear(); if (column == 0) { SimpleTextAttributes attr = SimpleTextAttributes.REGULAR_ATTRIBUTES; if (!selected && !isDefault) { attr = attr.derive(-1, FileStatus.MODIFIED.getColor(), null, null); } if (property.isImportant()) { attr = attr.derive(attr.getStyle() | SimpleTextAttributes.STYLE_BOLD, null, null, null); } if (property.isExpert()) { attr = attr.derive(attr.getStyle() | SimpleTextAttributes.STYLE_ITALIC, null, null, null); } if (property.isDeprecated()) { attr = attr.derive(attr.getStyle() | SimpleTextAttributes.STYLE_STRIKEOUT, null, null, null); } ErrorInfo errorInfo = getErrorInfoForRow(row); if (errorInfo != null) { SimpleTextAttributes template = SimpleTextAttributes.fromTextAttributes( EditorColorsManager.getInstance().getGlobalScheme().getAttributes(getErrorAttributes(errorInfo.getLevel().getSeverity()))); int style = ((template.getStyle() & SimpleTextAttributes.STYLE_WAVED) != 0 ? SimpleTextAttributes.STYLE_WAVED : 0) | ((template.getStyle() & SimpleTextAttributes.STYLE_UNDERLINE) != 0 ? SimpleTextAttributes.STYLE_UNDERLINE : 0); attr = attr.derive(attr.getStyle() | style, template.getFgColor(), null, template.getWaveColor()); } SearchUtil.appendFragments(mySpeedSearch.getEnteredPrefix(), property.getName(), attr.getStyle(), attr.getFgColor(), attr.getBgColor(), renderer); Icon icon = UIUtil.getTreeNodeIcon(isExpanded(property), selected, tableHasFocus); boolean hasChildren = !getChildren(property).isEmpty(); renderer.setIcon(hasChildren ? icon : null); Couple<Integer> indents = getBeforeIconAndAfterIndents(property, icon); int indent = indents.first; if (hasChildren) { renderer.setIconTextGap(indents.second); } else { indent += icon.getIconWidth() + indents.second; } renderer.setIpad(new Insets(0, indent, 0, 0)); return renderer; } else { try { PropertyRenderer valueRenderer = property.getRenderer(); JComponent component = valueRenderer.getComponent(getCurrentComponent(), getPropertyContext(), getValue(property), selected, tableHasFocus); component.setBackground(selected ? UIUtil.getTreeSelectionBackground(tableHasFocus) : background); component.setFont(table.getFont()); return component; } catch (Exception e) { LOG.debug(e); renderer.append(IdeBundle.message("dialog.text.error.getting.value", e.getMessage()), SimpleTextAttributes.ERROR_ATTRIBUTES); return renderer; } } }