本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}