Commit d07d5cc Andy Goryachev
committed Feb 14, 2025
1 parent 01059d4 commit d07d5cc Copy full SHA for d07d5cc
File tree 2 files changed +8
-8
lines changed
modules/javafx.controls/src/main/java/javafx/scene/control/skin
tests/system/src/test/java/test/robot/javafx/scene
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -127,16 +127,12 @@ public class PaginationSkin extends SkinBase<Pagination> {
127
127
private boolean nextPageReached = false ;
128
128
private boolean setInitialDirection = false ;
129
129
private int direction ;
130
-
131
130
private int currentAnimatedIndex ;
132
- private boolean hasPendingAnimation = false ;
133
-
131
+ private volatile boolean hasPendingAnimation ;
134
132
private boolean animate = true ;
135
-
136
133
private final PaginationBehavior behavior ;
137
134
138
135
139
-
140
136
/* *************************************************************************
141
137
* *
142
138
* Listeners *
@@ -712,6 +708,10 @@ private int getCurrentPageIndex() {
712
708
}
713
709
714
710
private void animateSwitchPage () {
711
+ if (!Platform .isFxApplicationThread ()) {
712
+ hasPendingAnimation = true ;
713
+ return ;
714
+ }
715
715
if (timeline != null ) {
716
716
timeline .setRate (8 );
717
717
hasPendingAnimation = true ;
Original file line number Diff line number Diff line change @@ -402,7 +402,6 @@ public void menuButton() {
402
402
});
403
403
}
404
404
405
- @ Disabled ("JDK-8349105" ) // FIX
406
405
@ Test
407
406
public void pagination () {
408
407
assumeFalse (SKIP_TEST );
@@ -414,9 +413,10 @@ public void pagination() {
414
413
c .setPageFactory ((pageIndex ) -> {
415
414
return new Label (pageIndex + " " + nextString ());
416
415
});
417
- c .setPageCount (100 );
418
- c .setCurrentPageIndex (nextInt (100 ));
416
+ int mx = 1 + nextInt (100 );
419
417
accessControl (c );
418
+ c .setPageCount (mx );
419
+ c .setCurrentPageIndex (nextInt (mx ));
420
420
});
421
421
}
422
422
You can’t perform that action at this time.
1 commit comments
openjdk-notifier[bot] commentedon Feb 14, 2025
Review
Issues