void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { SimpleTextAttributes attributes = SimpleTextAttributes.REGULAR_ATTRIBUTES; String text; if (value instanceof MyTreeNode node) { if (node.getKey().groupName == null) { attributes = SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES; } text = getRenamedTitle(node.getKey().getOptionName(), node.getText()); setEnabled(node.isEnabled()); } else { attributes = SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES; text = getRenamedTitle(value.toString(), value.toString()); setEnabled(true); } mySearchHelper.setLabelText(this, text, attributes.getStyle(), attributes.getFgColor(), attributes.getBgColor()); setBackground(RenderingUtil.getBackground(tree, selected)); setForeground(RenderingUtil.getForeground(tree, selected)); }