问题描述
我正在尝试从 stackoverflow 线程转换解决方案:禁用分页动画
I am trying to convert the solution from stackoverflow thread:Disable pagination animation
用 JavaFX 8 来做这件事太复杂了,因为 Utils 和 SkinBase 等其他类已经改变了不同的参数.
it is too complicated to do it with JavaFX 8 because Utils is and other classes like SkinBase have changed with different arguments.
有没有人有一个为 JavaFX8 禁用分页动画的工作示例?
does anyone have a working example with pagination animation disabled for JavaFX8 ?
推荐答案
好的,我做的!使用 Gabriel Féron 的回答:https://gist.github.com/gferon/4626632我已将其翻译成 JavaFX8:首先在要禁用分页动画的场景的 css 上创建一个 -fx-skin:
Ok,I did it!using Gabriel Féron answer from : https://gist.github.com/gferon/4626632I've translated it to JavaFX8:first create an -fx-skin on css of scene you want to disable pagination animation:
.pagination {
-fx-border-color: #0E5D79;
-fx-skin: "com.sun.javafx.scene.control.skin.PaginationSkinErez";
}
然后:使用以下附加的类而不是原始的 PaginationSkin.我无法附加这里有 5000 多行的课程.有人可以帮忙吗?
then:use the following attached class instead of original PaginationSkin.I can't attach the class here has 5000+ lines. can someone help with it ?
这篇关于禁用 javafx 8 的分页动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!