override fun paintComponent()

in src/main/kotlin/com/jetbrains/plugin/jtreg/ui/JTTagButton.kt [58:72]


        override fun paintComponent(g: Graphics) {
            val outline = ObjectUtils.tryCast(getClientProperty("JComponent.outline"), String::class.java)

            if (outline != null) {
                if (outline == "error") {
                    setBorderColorFunc.accept(JBUI.CurrentTheme.Focus.errorColor(hasFocus()))
                    return
                } else if (outline == "warning") {
                    setBorderColorFunc.accept(JBUI.CurrentTheme.Focus.warningColor(hasFocus()))
                    return
                }
            }
            setBorderColorFunc.accept(if (hasFocus()) null else getBackgroundColor())
            super.paintComponent(g)
        }