Hi there.
There are two issues with the current pagination skin at
http://hg.openjdk.java.net/openjfx/8u-dev/rt/file/3cc103a35bee/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/PaginationSkin.java
First - The indicator buttons are being recreated every time the page set is changed, causing a noticable flicker of the control.
To fix this, I modified the code so that the indicator button's page index and text is changed if the buttons were created before (and if the maximum amount of page indicators didn't change).
Second - The current page set handling is very unintuitive. Instead of changing the set only when the start or end of the current set is reached, the currently selected button should always be kept in the center (unless it's near the start or end of the pages).
I rewrote the changePageSet() method to achieve this behavior. The resource consumption outside of this method now is higher (because the page set is changed more frequently), but the first mentioned change makes up for that.
I tested the changes with my local skin implementation (which is slightly different from the one linked above), but I only changed what's necessary so it should be fine.
Link to the diff file:
https://my.owndrive.com/public.php?service=files&t=b6540b7cc4111d318ca45b84ef151239
Have fun,
Addi
There are two issues with the current pagination skin at
http://hg.openjdk.java.net/openjfx/8u-dev/rt/file/3cc103a35bee/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/PaginationSkin.java
First - The indicator buttons are being recreated every time the page set is changed, causing a noticable flicker of the control.
To fix this, I modified the code so that the indicator button's page index and text is changed if the buttons were created before (and if the maximum amount of page indicators didn't change).
Second - The current page set handling is very unintuitive. Instead of changing the set only when the start or end of the current set is reached, the currently selected button should always be kept in the center (unless it's near the start or end of the pages).
I rewrote the changePageSet() method to achieve this behavior. The resource consumption outside of this method now is higher (because the page set is changed more frequently), but the first mentioned change makes up for that.
I tested the changes with my local skin implementation (which is slightly different from the one linked above), but I only changed what's necessary so it should be fine.
Link to the diff file:
https://my.owndrive.com/public.php?service=files&t=b6540b7cc4111d318ca45b84ef151239
Have fun,
Addi