Define an intermediate superclass for Transitions with a duration property
Carl Carlec
carl.carlec at gmail.com
Mon May 8 19:03:02 UTC 2023
Hello JavaFX community,
I've created a draft PR for an enhancement to Transitions: https://github.com/openjdk/jfx/pull/1061
JavaFX contains many different Transitions that have a durationProperty() and related getter/setter.
Those transitions benefit from an abstract super class which defines this once.
This will therefore reduce a lot of code duplications or big switch-cases to handle all Transitions like the one linked in the ticket.
I propose to create a new abstract class called TimedTransition, which extends from Transition and defines the durationProperty() + getter/setter. All Transitions which define a durationProperty() will now extend from it and do not need to define it.
Those Transitions are affected: FadeTransition, FillTransition, PathTransition, PauseTransition, RotateTransition, ScaleTransition, StrokeTransition, TranslateTransition.
Feedback welcome!
Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230508/324ec42c/attachment.htm>
More information about the openjfx-dev
mailing list