RFR: 8345261: Refactor the Dimension2D classes
Nir Lisker
nlisker at openjdk.org
Mon Dec 2 11:35:44 UTC 2024
On Fri, 29 Nov 2024 17:00:42 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
> A small refactoring of the Dimension classes.
>
> * `com.sun.javafx.geom.Dimension` was removed and its uses were replaced by `com.sun.javafx.geom.Dimension2D`.
> * `com.sun.javafx.geom.Dimension2D` became a record.
> * `javafx.geometry.Dimension2D`: fields became `final`.
>
> I'm not sure we need the implementation class at all considering we are free to use the public one.
I also looked at the uses of `com.sun.javafx.geom.Rectangle` and in almost all cases I've looked at, its values are widened to floats later on. I'm not going to change anything there, but there is an indication that it's not the right tool for the job.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1653#issuecomment-2511288436
More information about the openjfx-dev
mailing list