-
Notifications
You must be signed in to change notification settings - Fork 24
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
i_395 scoring properties settings now on main page #910
i_395 scoring properties settings now on main page #910
Conversation
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.
This looks reasonable, and tested fine.
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.
Code looks good and works as described, however, the GUI does not look right on my system (probably a result of the flow layout and my default fonts/resolution). See the attached image. Resizing the window obviously does not change anything.
In addition, I don't see any reason not to make the property sheet be a little wider to start with. The reason being, in practice, the Value's for the HTML directories tend to be longer than the defaults, so it would be nice to see a little more context and not have the scroll-bars pop up almost immediately when you start typing in one of those fields. Maybe make the Value column as wide as the Property column?
I agree that the layout needs to be fixed so it looks reasonable on all (or at least most) platforms. I'm pretty sure it's a matter of something like putting the components into their own sub-JPanels, and perhaps changing the LayoutManager for the pane. Unfortunately, it's not something I have time to work on myself right now :( |
@@ -69,8 +73,10 @@ private MCLB getPropertyListBox() { | |||
HeapSorter sorter = new HeapSorter(); | |||
propertyListBox.setColumnSorter(1, sorter, 1); | |||
|
|||
propertyListBox.autoSizeAllColumns(); | |||
|
|||
propertyListBox.setColumnSize(0,this.lengthOfColumns); |
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.
Why are you using "this." here to refer to the member lengthOfColumns
?
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 think I pickup that habit in Python. Java implicitly adds preprends that i think so as you suggest, there is no need for that here.
@@ -115,7 +121,8 @@ protected void refreshProperties() { | |||
propertyListBox.addRow(objects); | |||
} | |||
|
|||
propertyListBox.autoSizeAllColumns(); | |||
propertyListBox.setColumnSize(0,this.lengthOfColumns); |
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.
Same as above. Why are you using "this." ?
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 think I pickup that habit in Python. Java implicitly adds preprends that i think so as you suggest, there is no need for that here.
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.
This seems to work on the several systems I tried it on, and the new layout looks good.
I will await the answers to my question about the "this" usage before approval.
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.
Looks good.
Description of what the PR does
Judging Settings Pane in Settings for Admin has been updated so that Scoring Properties are displayed without a new frame and saves without additional button.
Issue which the PR addresses
Fixes #395
Environment in which the PR was developed (OS,IDE, Java version, etc.)
Windows 11, Eclipse 2021-12 R, JDK 8u381 (1.8)
Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)
On admin, select settings, see that there is a Scoring Properties Pane, try to update the value.