For JavaFX 2.2, the pagination animation is going to be a little tough to disable.
As you note there is no public API to disable the animation (and there isn't anything in CSS). What you will need to is create your own skin and assign that skin to the pagination control.
To do this use the default JavaFX 2.2 pagination skin as a base and edit it so that it doesn't do animations. If you rename your custom pagination skin to another package (e.g. org.acme.javafx.scene.control.skin), then you can specify that new skin via assigning a css stylesheet to your app which includes the following rule:
.pagination {
-fx-skin: "org.acme.javafx.scene.control.skin.PaginationSkin";
}
Apart from the difficulty of initial implementation for a new JavaFX user (which is rather significant) another serious downside to this approach is that in JavaFX 2.2, the skin API is not public, so when JavaFX 8 is released where the skin api is public, your changes probably won't work, so you will need to recode them for JavaFX 8. The reason your changes won't continue to work for JavaFX 8 is that the com.sun.javafx.scene.control.skin.SkinBase
class your custom pagination skin needs to derive from will have moved to something like javafx.scene.control.skin.SkinBase
to become public API.
So I'd suggest living with the Pagination animation for now unless you really need to get rid of it.
There is currently a a request against the JavaFX runtime issue tracker to allow disabling animation in the Pagination control. See RT-26439 Pagination: Animation of page flip should be deactivatable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…