The attached test case proofs that a key frame at exactly Duration.ZERO _is not_ getting applied, but that a key frame at a slightly later time (e. g. Duration.millis(0.1)) _is_ getting applied.
The JavaDocs of KeyFrame#getTime clearly say that it is definitively valid to have a key frame exactly at Duration.ZERO, so either this is a bug in the JavaDocs or in the implementation: <quote>The time of a KeyFrame has to be greater than OR EQUAL TO Duration.ZERO and it cannot be Duration.UNKNOWN.</quote>
While clearly unexpected problems arise from skipping key frames (e. g. initial property change event not fired), there is a simple workaround: Using at key frame at a time of 0.1ms instead of exactly 0.0ms.
The JavaDocs of KeyFrame#getTime clearly say that it is definitively valid to have a key frame exactly at Duration.ZERO, so either this is a bug in the JavaDocs or in the implementation: <quote>The time of a KeyFrame has to be greater than OR EQUAL TO Duration.ZERO and it cannot be Duration.UNKNOWN.</quote>
While clearly unexpected problems arise from skipping key frames (e. g. initial property change event not fired), there is a simple workaround: Using at key frame at a time of 0.1ms instead of exactly 0.0ms.
- duplicates
-
JDK-8142459 KeyValue ignored if it only appears in a KeyFrame with 0 duration
- Open