-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JEditableCheckBox paint a border in a color #6379
base: master
Are you sure you want to change the base?
Conversation
JEditableCheckBox paint a border in a color (likes Very light blue) to help differentiation to Standard Checkbox and Editable Checkbox.
Currently the color is hard coded in the Class with: Color(51,204,255) but |
add a space after the comma to be style compatible
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have multiple color schemas, so I do not think hardcoding a color is the right thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never write Kotlin code and i can't code correctly read property in jmeter.properties or user.properties with
var propBorderColor = JMeterUtils.getResStringDefault("JEditableCheckBox.border.color","51,204,255")
I get an error "Adding dependency on module 'jmeter.src.core.main' will introduce circular dependency between modules 'jmeter.src.core.main' and 'jmeter.src.jorphan.main'. Add dependency anyway?"
vlsi could you code this external configuration ?
the border color could be a new JMeter property likes :
RGB Color:
JEditableCheckBox.border.color=51,204,255
or standard Color:
JEditableCheckBox.border.color=ORANGE
Regards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is that orange
might not work for all the color themes, so it should be rather something like "accent color" which is declared separately for each look and feel. I am not sure if jmeter.properties
can configure different values for different look and feels.
This makes adding new colors hard, so we should rather try reusing the existing color resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main question is how to distinguish a standard checkbox from a special JEditableCheckBox ?
I proposed to add a colored border but if you have another proposition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the need to mark the expression-supporting checkboxes?
Imagine we will support expressions in all the checkboxes. Why highlight all of them in the UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some checkbox are standards some not and you don’t know except when you right click on the checkbox. No documentation explains that you could modify the checkbox value with an expression. I think is important to visually know the nature of the checkbox (standard or Editable)
JEditableCheckBox paint a border in a color (likes Very Light Blue) to help differentiation to Standard Checkbox (no border) and Editable Checkbox (with color border).
Description
JEditableCheckBox paint a border in a color (likes Very light blue)
Motivation and Context
Since 5.6.x some checkboxes could be change in an expression (right click on checkbox) but there is no external information to explains if the checkbox is "standard" or "expression compatible".
How Has This Been Tested?
Change border color to Orange, Blue and Very Light Blue (not standard color).
Use the "HTTP Request" as demo because some checkbox are standard checkbox and some checkbox are editable checkbox (Expression)
Screenshots (if appropriate):
Border Color.ORANGE
Border Color.BLUE
Border Color(51,204,255) Very Light Blue my prefered color
Border Color(51,204,255) Very Light Blue in Darcula look and feel
Types of changes
Link to Add a differentiator for checkboxes that can contain expressions. #6377
Checklist: