禁用JavaFX 8的分页动画 [英] Disable pagination animation for javafx 8

查看:86
本文介绍了禁用JavaFX 8的分页动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从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 ?

推荐答案

好, 我做到了! 使用GabrielFé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/4626632 I'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的分页动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆