• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ParallelTransitionBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javafx.animation.ParallelTransitionBuilder的典型用法代码示例。如果您正苦于以下问题:Java ParallelTransitionBuilder类的具体用法?Java ParallelTransitionBuilder怎么用?Java ParallelTransitionBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ParallelTransitionBuilder类属于javafx.animation包,在下文中一共展示了ParallelTransitionBuilder类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildTextPartAnimation

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * Builds the text part animation.
 *
 * @param textNode the text node
 * @return the animation
 */
private Animation buildTextPartAnimation(final Text textNode) {
    return ParallelTransitionBuilder.create()
                                    .node(textNode)
                                    .children(

                                              ScaleTransitionBuilder.create()
                                                                    .duration(Duration.millis(300)) // SHOULD BE CONFIGURABLE (Game Speed)
                                                                    .fromX(0.0).toX(1.0)
                                                                    .fromY(0.0).toY(1.0)
                                                                    .build())

                                    .build();
}
 
开发者ID:JRebirth,项目名称:MasteringTables,代码行数:20,代码来源:ExpressionView.java


示例2: buildExpressionResolved

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * Gets the expression resolved.
 *
 * @return the expression resolved
 */
private Animation buildExpressionResolved() {

    return ParallelTransitionBuilder.create()
                                    .delay(Duration.millis(400))
                                    .children(
                                              ScaleTransitionBuilder.create()
                                                                    .node(this.result)
                                                                    .fromX(1).toX(4.0)
                                                                    .fromY(1).toY(4.0)
                                                                    .build(),

                                              ScaleTransitionBuilder.create()
                                                                    .node(getLeftOperand())
                                                                    .fromX(1).toX(0)
                                                                    .fromY(1).toY(0)
                                                                    .build(),
                                              ScaleTransitionBuilder.create()
                                                                    .node(getOperator())
                                                                    .fromX(1).toX(0)
                                                                    .fromY(1).toY(0)
                                                                    .build(),
                                              ScaleTransitionBuilder.create()
                                                                    .node(getRightOperand())
                                                                    .fromX(1).toX(0)
                                                                    .fromY(1).toY(0)
                                                                    .build(),
                                              ScaleTransitionBuilder.create()
                                                                    .node(getEquality())
                                                                    .fromX(1).toX(0)
                                                                    .fromY(1).toY(0)
                                                                    .build())
                                    .build();
}
 
开发者ID:JRebirth,项目名称:MasteringTables,代码行数:39,代码来源:ExpressionView.java


示例3: start

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void start() {
    SequentialTransitionBuilder.create()
                               .children(

                                         buildBeanAnimation(this.ratioLabel, this.ratioCircle, MTColors.RESULT_RATIO.get()),
                                         buildBeanAnimation(this.timeLabel, this.timeBean, MTColors.RESULT_TIME.get()),

                                         ParallelTransitionBuilder.create()
                                                                  .children(
                                                                            TranslateTransitionBuilder.create().node(this.monsterImage).delay(Duration.millis(500)).duration(Duration.millis(400))
                                                                                                      .byY(-766).build(),
                                                                            buildBeanAnimation(this.successLabel, this.successBean, MTColors.RESULT_SUCCESS.get()),
                                                                            FadeTransitionBuilder.create().node(this.successIcon).duration(Duration.millis(500)).fromValue(0).toValue(1).build())
                                                                  .build(),

                                         ParallelTransitionBuilder.create()
                                                                  .children(
                                                                            buildBeanAnimation(this.failureLabel, this.failureBean, MTColors.RESULT_FAILURE.get()),
                                                                            FadeTransitionBuilder.create().node(this.failureIcon).duration(Duration.millis(500)).fromValue(0).toValue(1).build())
                                                                  .build()

                               )

                               .build().playFromStart();

}
 
开发者ID:JRebirth,项目名称:MasteringTables,代码行数:31,代码来源:ResultView.java


示例4: buildBeanAnimation

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * Build a bean animation.
 *
 * @param label the attached label
 * @param shape the shape to show
 * @param fillColor the color to use to paint the shape
 *
 * @return the bean animation
 */
private Animation buildBeanAnimation(final Label label, final Shape shape, final Color fillColor) {
    return ParallelTransitionBuilder.create()
                                    .children(
                                              ScaleTransitionBuilder.create().node(label).delay(Duration.millis(50)).duration(Duration.millis(300))
                                                                    .fromX(0).fromY(0).toX(1).toY(1).build(),
                                              FillTransitionBuilder.create().shape(shape)
                                                                   .fromValue(Color.LIGHTGREY).toValue(fillColor)
                                                                   .build())
                                    .build();
}
 
开发者ID:JRebirth,项目名称:MasteringTables,代码行数:20,代码来源:ResultView.java


示例5: performStepAnimation

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * TODO To complete.
 *
 * @param nextSlide the next slide
 */
private void performStepAnimation(final Node nextSlide) {

    this.subSlideTransition = ParallelTransitionBuilder.create()

                                                       .onFinished(new EventHandler<ActionEvent>() {

                                                           @Override
                                                           public void handle(final ActionEvent event) {
                                                               AbstractBaseView.this.currentSubSlide = nextSlide;
                                                           }
                                                       })

                                                       .children(
                                                                 SequentialTransitionBuilder.create()
                                                                                            .node(this.currentSubSlide)
                                                                                            .children(
                                                                                                      TranslateTransitionBuilder.create()
                                                                                                                                .duration(Duration.millis(400))
                                                                                                                                .fromY(0)
                                                                                                                                .toY(-700)
                                                                                                                                // .fromZ(-10)
                                                                                                                                .build(),
                                                                                                      TimelineBuilder.create()
                                                                                                                     .keyFrames(
                                                                                                                                new KeyFrame(Duration.millis(0),
                                                                                                                                             new KeyValue(this.currentSubSlide.visibleProperty(),
                                                                                                                                                          true)),
                                                                                                                                new KeyFrame(Duration.millis(1),
                                                                                                                                             new KeyValue(this.currentSubSlide.visibleProperty(),
                                                                                                                                                          false)))
                                                                                                                     .build())

                                                                                            .build(),
                                                                 SequentialTransitionBuilder.create()
                                                                                            .node(nextSlide)
                                                                                            .children(
                                                                                                      TimelineBuilder.create()
                                                                                                                     .keyFrames(
                                                                                                                                new KeyFrame(Duration.millis(0),
                                                                                                                                             new KeyValue(nextSlide.visibleProperty(), false)),
                                                                                                                                new KeyFrame(Duration.millis(1),
                                                                                                                                             new KeyValue(nextSlide.visibleProperty(), true)))
                                                                                                                     .build(),
                                                                                                      TranslateTransitionBuilder.create()
                                                                                                                                .duration(Duration.millis(400))
                                                                                                                                .fromY(700)
                                                                                                                                .toY(0)
                                                                                                                                // .fromZ(-10)
                                                                                                                                .build())
                                                                                            .build())
                                                       .build();
    this.subSlideTransition.play();

}
 
开发者ID:JRebirth,项目名称:JRebirth-Tour,代码行数:60,代码来源:AbstractBaseView.java


示例6: performStepAnimation

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * TODO To complete.
 *
 * @param nextSlide the next slide
 */
private void performStepAnimation(final Node nextSlide) {

    this.subSlideTransition = ParallelTransitionBuilder.create()

                                                       .onFinished(new EventHandler<ActionEvent>() {

                                                           @Override
                                                           public void handle(final ActionEvent event) {
                                                               BasicView.this.currentSubSlide = nextSlide;
                                                           }
                                                       })

                                                       .children(
                                                                 SequentialTransitionBuilder.create()
                                                                                            .node(this.currentSubSlide)
                                                                                            .children(
                                                                                                      TranslateTransitionBuilder.create()
                                                                                                                                .duration(Duration.millis(400))
                                                                                                                                .fromY(model().isForwardFlow() ? 0 : 0)
                                                                                                                                .toY(model().isForwardFlow() ? -700 : 700)
                                                                                                                                // .fromZ(-10)
                                                                                                                                .build(),
                                                                                                      TimelineBuilder.create()
                                                                                                                     .keyFrames(
                                                                                                                                new KeyFrame(Duration.millis(0),
                                                                                                                                             new KeyValue(this.currentSubSlide.visibleProperty(),
                                                                                                                                                          true)),
                                                                                                                                new KeyFrame(Duration.millis(1),
                                                                                                                                             new KeyValue(this.currentSubSlide.visibleProperty(),
                                                                                                                                                          false)))
                                                                                                                     .build())

                                                                                            .build(),
                                                                 SequentialTransitionBuilder.create()
                                                                                            .node(nextSlide)
                                                                                            .children(
                                                                                                      TimelineBuilder.create()
                                                                                                                     .keyFrames(
                                                                                                                                new KeyFrame(Duration.millis(0),
                                                                                                                                             new KeyValue(nextSlide.visibleProperty(), false)),
                                                                                                                                new KeyFrame(Duration.millis(1),
                                                                                                                                             new KeyValue(nextSlide.visibleProperty(), true)))
                                                                                                                     .build(),
                                                                                                      TranslateTransitionBuilder.create()
                                                                                                                                .duration(Duration.millis(400))
                                                                                                                                .fromY(model().isForwardFlow() ? 700 : -700)
                                                                                                                                .toY(model().isForwardFlow() ? 0 : 0)
                                                                                                                                // .fromZ(-10)
                                                                                                                                .build())
                                                                                            .build())
                                                       .build();
    this.subSlideTransition.play();

}
 
开发者ID:JRebirth,项目名称:JRebirth-Tour,代码行数:60,代码来源:BasicView.java


示例7: getParallel

import javafx.animation.ParallelTransitionBuilder; //导入依赖的package包/类
/**
 * TODO To complete.
 * 
 * @param gf
 * @return
 */
protected Animation getParallel(final Animation... animation) {
    return ParallelTransitionBuilder.create().children(animation).build();
}
 
开发者ID:JRebirth,项目名称:JRebirth-Tour,代码行数:10,代码来源:PatternView.java



注:本文中的javafx.animation.ParallelTransitionBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CacheManagerSection类代码示例发布时间:2022-05-23
下一篇:
Java AddressingUtils类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap