From 2954491af38800b60fb762de050e69eb92b46bdf Mon Sep 17 00:00:00 2001 From: Vincent DABURON Date: Tue, 5 Nov 2024 16:50:10 +0100 Subject: [PATCH 1/2] JEditableCheckBox paint a border in a color JEditableCheckBox paint a border in a color (likes Very light blue) to help differentiation to Standard Checkbox and Editable Checkbox. --- .../main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt b/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt index ea825cf9206..1365a2736c7 100644 --- a/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt +++ b/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt @@ -18,10 +18,12 @@ package org.apache.jorphan.gui import org.apiguardian.api.API +import java.awt.Color import java.awt.Container import java.awt.FlowLayout import java.awt.event.ActionEvent import javax.swing.AbstractAction +import javax.swing.BorderFactory import javax.swing.Box import javax.swing.JCheckBox import javax.swing.JComboBox @@ -105,6 +107,8 @@ public open class JEditableCheckBox( private val checkbox: JCheckBox = JCheckBox(label).apply { val cb = this + cb.setBorderPainted(true) + cb.setBorder(BorderFactory.createLineBorder(Color(51,204,255))) // Very light blue componentPopupMenu = JPopupMenu().apply { add(useExpressionAction) } From 587642a378b667151314bbe1177d584c86f50c77 Mon Sep 17 00:00:00 2001 From: Vincent DABURON Date: Tue, 5 Nov 2024 17:33:55 +0100 Subject: [PATCH 2/2] Update JEditableCheckBox.kt add a space after the comma to be style compatible --- .../src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt b/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt index 1365a2736c7..f489fa8c3c0 100644 --- a/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt +++ b/src/jorphan/src/main/kotlin/org/apache/jorphan/gui/JEditableCheckBox.kt @@ -108,7 +108,7 @@ public open class JEditableCheckBox( private val checkbox: JCheckBox = JCheckBox(label).apply { val cb = this cb.setBorderPainted(true) - cb.setBorder(BorderFactory.createLineBorder(Color(51,204,255))) // Very light blue + cb.setBorder(BorderFactory.createLineBorder(Color(51, 204, 255))) // Very light blue componentPopupMenu = JPopupMenu().apply { add(useExpressionAction) }