RFR: 8328400: Minor Cleanup

Andy Goryachev angorya at openjdk.org
Wed Mar 20 15:02:37 UTC 2024


On Wed, 20 Mar 2024 10:40:19 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> - PrismTextLayout:325 misspelled 'sliptCaretOffset'
>> - DatePicker System.err.println L 125, 139, 172, 256
>> - SpinnerTest.java L 1588, 1609 -> loses/losing (also in MenuBarSkin, DatePickerTest, FocusTest, and a few more)
>> - Labeled:821 obsolete comment
>> 
>> Some more typos:
>> - occuring -> occurring (e.g. CellBehaviourBase)
>> - ButtonTest - conextMenuShouldntShowOnAction -> context...
>> - ControlResources - translateable -> translatable
>> - DateCellSkin - Pirvate -> Private
>> - totaly -> totally (e.g. LineChart)
>> - MenuItem - programatically -> programmatically
>> - Tooltip - invaildated -> invalidated
>> 
>> (thank you @Maran23 )
>
> modules/javafx.controls/src/main/java/javafx/scene/control/DatePicker.java line 126:
> 
>> 124:                 //System.err.println("Restoring value to " +
>> 125:                 //        ((lastValidDate == null) ? "null" : getConverter().toString(lastValidDate)));
>> 126:                 setValue(lastValidDate);
> 
> FYI I found it very weird that `DatePicker` tries to 'recover' itself when wrong values are set. I think this is the only? `Control` that does this behaviour

I think ComboBox:243 also does that.

Basically, if we have a free-form text field as an input to a constrained value property, there must be a way to enforce the constraint.

Note that all this is not needed in e.g. ColorPicker because its "editor" always produces a valid value.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1409#discussion_r1532243353


More information about the openjfx-dev mailing list