本文整理汇总了Java中javafx.animation.Interpolator.EASE_IN属性的典型用法代码示例。如果您正苦于以下问题:Java Interpolator.EASE_IN属性的具体用法?Java Interpolator.EASE_IN怎么用?Java Interpolator.EASE_IN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javafx.animation.Interpolator
的用法示例。
在下文中一共展示了Interpolator.EASE_IN属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FlipTransition
/**
* Create new FlipTransition
*
* @param node The node to affect
*/
public FlipTransition(final Node node) {
super(node, new Timeline(
new KeyFrame(Duration.millis(0),
new KeyValue(node.rotateProperty(), 0, Interpolator.EASE_OUT),
new KeyValue(node.translateZProperty(), 0, Interpolator.EASE_OUT)),
new KeyFrame(Duration.millis(400),
new KeyValue(node.translateZProperty(), -150, Interpolator.EASE_OUT),
new KeyValue(node.rotateProperty(), -170, Interpolator.EASE_OUT)),
new KeyFrame(Duration.millis(500),
new KeyValue(node.translateZProperty(), -150, Interpolator.EASE_IN),
new KeyValue(node.rotateProperty(), -190, Interpolator.EASE_IN),
new KeyValue(node.scaleXProperty(), 1, Interpolator.EASE_IN),
new KeyValue(node.scaleYProperty(), 1, Interpolator.EASE_IN)),
new KeyFrame(Duration.millis(800),
new KeyValue(node.translateZProperty(), 0, Interpolator.EASE_IN),
new KeyValue(node.rotateProperty(), -360, Interpolator.EASE_IN),
new KeyValue(node.scaleXProperty(), 0.95, Interpolator.EASE_IN),
new KeyValue(node.scaleYProperty(), 0.95, Interpolator.EASE_IN)),
new KeyFrame(Duration.millis(1000),
new KeyValue(node.scaleXProperty(), 1, Interpolator.EASE_IN),
new KeyValue(node.scaleYProperty(), 1, Interpolator.EASE_IN))));
this.flipNode = node;
setCycleDuration(Duration.seconds(1));
setDelay(Duration.seconds(0.2));
}
示例2: flipToFront
public void flipToFront() {
if (Double.compare(rotate.getAngle(), 0) == 0) return;
KeyValue kvStart = new KeyValue(rotate.angleProperty(), 180, Interpolator.EASE_IN);
KeyValue kvStop = new KeyValue(rotate.angleProperty(), 0, Interpolator.EASE_OUT);
KeyFrame kfStart = new KeyFrame(Duration.ZERO, kvStart);
KeyFrame kfStop = new KeyFrame(Duration.millis(flipTime), kvStop);
flipToFront.getKeyFrames().setAll(kfStart, kfStop);
front.setCache(true);
front.setCacheHint(CacheHint.ROTATE);
back.setCache(true);
back.setCacheHint(CacheHint.ROTATE);
flipToFront.setOnFinished(event -> {
front.setCache(false);
back.setCache(false);
fireEvent(new FlipEvent(FlipPanel.this, FlipPanel.this, FlipEvent.FLIP_TO_FRONT_FINISHED));
});
flipToFront.play();
}
示例3: flipToBack
public void flipToBack() {
if (Double.compare(rotate.getAngle(), 180) == 0) return;
KeyValue kvStart = new KeyValue(rotate.angleProperty(), 0, Interpolator.EASE_IN);
KeyValue kvStop = new KeyValue(rotate.angleProperty(), 180, Interpolator.EASE_OUT);
KeyFrame kfStart = new KeyFrame(Duration.ZERO, kvStart);
KeyFrame kfStop = new KeyFrame(Duration.millis(flipTime), kvStop);
flipToBack.getKeyFrames().setAll(kfStart, kfStop);
front.setCache(true);
front.setCacheHint(CacheHint.ROTATE);
back.setCache(true);
back.setCacheHint(CacheHint.ROTATE);
flipToBack.setOnFinished(event -> {
front.setCache(false);
back.setCache(false);
fireEvent(new FlipEvent(FlipPanel.this, FlipPanel.this, FlipEvent.FLIP_TO_BACK_FINISHED));
});
flipToBack.play();
}
示例4: createAnimation
private Timeline createAnimation() {
return new Timeline(
new KeyFrame(Duration.millis(0), new KeyValue(angle, HALF_PIE)),
new KeyFrame(Duration.millis(ANIMATION_DURATION / 2), new KeyValue(angle, 0, Interpolator.EASE_IN)),
new KeyFrame(Duration.millis(ANIMATION_DURATION / 2), new EventHandler<ActionEvent>() {
@Override
public void handle(final ActionEvent arg0) {
// TODO -- Do they another way or API to do this?
flippedProperty.set(flippedProperty.not().get());
}
}),
new KeyFrame(Duration.millis(ANIMATION_DURATION / 2), new KeyValue(angle, PIE)),
new KeyFrame(Duration.millis(ANIMATION_DURATION), new KeyValue(angle, HALF_PIE, Interpolator.EASE_OUT))
);
}
示例5: drawNode
@Override
public Node drawNode() {
Pane p = pre();
//create a timeline for moving the circle
timeline.setCycleCount(1);
timeline.setAutoReverse(true);
keyValue1 = new KeyValue(circle.translateXProperty(), 300, Interpolator.EASE_OUT);
keyValue2 = new KeyValue(circle.translateYProperty(), 200, Interpolator.EASE_IN);
AnimationBooleanInterpolator boolInterp = new AnimationBooleanInterpolator();
keyValue3 = new KeyValue(circle.visibleProperty(), false, boolInterp);
KeyFrame keyFrame1 = new KeyFrame(duration, onFinish, keyValue1 , keyValue2);
timeline.getKeyFrames().add(keyFrame1);
KeyFrame keyFrame3 = new KeyFrame(duration, keyValue3);
timeline.getKeyFrames().add(keyFrame3);
return p;
}
示例6: flipForward
public void flipForward() {
timeline.stop();
flap.setCacheShape(true);
flap.setCache(true);
flap.setCacheHint(CacheHint.ROTATE);
//flap.setCacheHint(CacheHint.SPEED);
currentSelectionIndex++;
if (currentSelectionIndex >= selectedSet.size()) {
currentSelectionIndex = 0;
}
nextSelectionIndex = currentSelectionIndex + 1;
if (nextSelectionIndex >= selectedSet.size()) {
nextSelectionIndex = 0;
}
//keyValueFlap = new KeyValue(rotateFlap.angleProperty(), 180, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
keyValueFlap = new KeyValue(rotateFlap.angleProperty(), 180, Interpolator.EASE_IN);
keyFrame = new KeyFrame(Duration.millis(getSkinnable().getFlipTime()), keyValueFlap);
timeline.getKeyFrames().setAll(keyFrame);
timeline.play();
}
示例7: animateCardMovement
/**
* Animates card movements.
*
* @param card The card view to animate.
* @param sourceX Source X coordinate of the card view.
* @param sourceY Source Y coordinate of the card view.
* @param targetX Destination X coordinate of the card view.
* @param targetY Destination Y coordinate of the card view.
* @param duration The duration of the animation.
* @param doAfter The action to perform after the animation has been completed.
*/
private void animateCardMovement(
CardView card, double sourceX, double sourceY,
double targetX, double targetY, Duration duration,
EventHandler<ActionEvent> doAfter) {
Path path = new Path();
path.getElements().add(new MoveToAbs(card, sourceX, sourceY));
path.getElements().add(new LineToAbs(card, targetX, targetY));
PathTransition pathTransition =
new PathTransition(duration, path, card);
pathTransition.setInterpolator(Interpolator.EASE_IN);
pathTransition.setOnFinished(doAfter);
Timeline blurReset = new Timeline();
KeyValue bx = new KeyValue(card.getDropShadow().offsetXProperty(), 0, Interpolator.EASE_IN);
KeyValue by = new KeyValue(card.getDropShadow().offsetYProperty(), 0, Interpolator.EASE_IN);
KeyValue br = new KeyValue(card.getDropShadow().radiusProperty(), 2, Interpolator.EASE_IN);
KeyFrame bKeyFrame = new KeyFrame(duration, bx, by, br);
blurReset.getKeyFrames().add(bKeyFrame);
ParallelTransition pt = new ParallelTransition(card, pathTransition, blurReset);
pt.play();
}
示例8: flipBackward
public void flipBackward() {
timeline.stop();
//keyValueFlap = new KeyValue(rotateFlap.angleProperty(), -180, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
keyValueFlap = new KeyValue(rotateFlap.angleProperty(), -180, Interpolator.EASE_IN);
keyFrame = new KeyFrame(Duration.millis(getSkinnable().getFlipTime()), keyValueFlap);
timeline.getKeyFrames().setAll(keyFrame);
timeline.play();
}
示例9: createItemOpenTimeLine
private Timeline createItemOpenTimeLine(final StackPane NODE, final double X, final double Y, final double DELAY) {
KeyValue kvX1 = new KeyValue(NODE.translateXProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvY1 = new KeyValue(NODE.translateYProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvR1 = new KeyValue(NODE.rotateProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvO1 = new KeyValue(NODE.opacityProperty(), 0.0, Interpolator.EASE_OUT);
KeyValue kvX2 = new KeyValue(NODE.translateXProperty(), 0.0);
KeyValue kvY2 = new KeyValue(NODE.translateYProperty(), 0.0);
KeyValue kvX3 = new KeyValue(NODE.translateXProperty(), 1.1 * X, Interpolator.EASE_IN);
KeyValue kvY3 = new KeyValue(NODE.translateYProperty(), 1.1 * Y, Interpolator.EASE_IN);
KeyValue kvX4 = new KeyValue(NODE.translateXProperty(), 0.95 * X, Interpolator.EASE_OUT);
KeyValue kvY4 = new KeyValue(NODE.translateYProperty(), 0.95 * Y, Interpolator.EASE_OUT);
KeyValue kvRO4 = new KeyValue(NODE.rotateProperty(), 360);
KeyValue kvO4 = new KeyValue(NODE.opacityProperty(), 1.0, Interpolator.EASE_OUT);
KeyValue kvX5 = new KeyValue(NODE.translateXProperty(), X);
KeyValue kvY5 = new KeyValue(NODE.translateYProperty(), Y);
KeyFrame kfO1 = new KeyFrame(Duration.millis(0), kvX1, kvY1, kvR1, kvO1);
KeyFrame kfO2 = new KeyFrame(Duration.millis(50 + DELAY), kvX2, kvY2);
KeyFrame kfO3 = new KeyFrame(Duration.millis(250 + DELAY), kvX3, kvY3);
KeyFrame kfO4 = new KeyFrame(Duration.millis(400 + DELAY), kvX4, kvY4, kvRO4, kvO4);
KeyFrame kfO5 = new KeyFrame(Duration.millis(550 + DELAY), kvX5, kvY5);
return new Timeline(kfO1, kfO2, kfO3, kfO4, kfO5);
}
示例10: createItemCloseTimeLine
private Timeline createItemCloseTimeLine(final StackPane NODE, final double X, final double Y, final double DELAY) {
KeyValue kvX1 = new KeyValue(NODE.translateXProperty(), X);
KeyValue kvY1 = new KeyValue(NODE.translateYProperty(), Y);
KeyValue kvRC2 = new KeyValue(NODE.rotateProperty(), 720);
KeyValue kvX3 = new KeyValue(NODE.translateXProperty(), X, Interpolator.EASE_IN);
KeyValue kvY3 = new KeyValue(NODE.translateYProperty(), Y, Interpolator.EASE_IN);
KeyValue kvX4 = new KeyValue(NODE.translateXProperty(), 0);
KeyValue kvY4 = new KeyValue(NODE.translateYProperty(), 0);
KeyValue kvX5 = new KeyValue(NODE.translateXProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvY5 = new KeyValue(NODE.translateYProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvR5 = new KeyValue(NODE.rotateProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvO5 = new KeyValue(NODE.opacityProperty(), 0.5);
KeyValue kvO6 = new KeyValue(NODE.opacityProperty(), 0);
KeyFrame kfC1 = new KeyFrame(Duration.millis(0), kvX1, kvY1);
KeyFrame kfC2 = new KeyFrame(Duration.millis(50 + DELAY), kvRC2);
KeyFrame kfC3 = new KeyFrame(Duration.millis(250 + DELAY), kvX3, kvY3);
KeyFrame kfC4 = new KeyFrame(Duration.millis(400 + DELAY), kvX4, kvY4);
KeyFrame kfC5 = new KeyFrame(Duration.millis(550 + DELAY), kvX5, kvY5, kvR5, kvO5);
KeyFrame kfC6 = new KeyFrame(Duration.millis(551 + DELAY), kvO6);
return new Timeline(kfC1, kfC2, kfC3, kfC4, kfC5, kfC6);
}
示例11: createSimpleItemOpenTimeLine
private Timeline createSimpleItemOpenTimeLine(final StackPane NODE, final double X, final double Y, final double DELAY) {
KeyValue kvX1 = new KeyValue(NODE.translateXProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvY1 = new KeyValue(NODE.translateYProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvR1 = new KeyValue(NODE.rotateProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvO1 = new KeyValue(NODE.opacityProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvX2 = new KeyValue(NODE.translateXProperty(), 0.0);
KeyValue kvY2 = new KeyValue(NODE.translateYProperty(), 0.0);
KeyValue kvX3 = new KeyValue(NODE.translateXProperty(), 1.1 * X, Interpolator.EASE_IN);
KeyValue kvY3 = new KeyValue(NODE.translateYProperty(), 1.1 * Y, Interpolator.EASE_IN);
KeyValue kvX4 = new KeyValue(NODE.translateXProperty(), 0.97 * X, Interpolator.EASE_OUT);
KeyValue kvY4 = new KeyValue(NODE.translateYProperty(), 0.97 * Y, Interpolator.EASE_OUT);
KeyValue kvRO4 = new KeyValue(NODE.rotateProperty(), 360);
KeyValue kvO4 = new KeyValue(NODE.opacityProperty(), 1.0, Interpolator.EASE_OUT);
KeyValue kvX5 = new KeyValue(NODE.translateXProperty(), X);
KeyValue kvY5 = new KeyValue(NODE.translateYProperty(), Y);
KeyFrame kfO1 = new KeyFrame(Duration.millis(0), kvX1, kvY1, kvR1, kvO1);
KeyFrame kfO2 = new KeyFrame(Duration.millis(50 + DELAY), kvX2, kvY2);
KeyFrame kfO3 = new KeyFrame(Duration.millis(150 + DELAY), kvX3, kvY3);
KeyFrame kfO4 = new KeyFrame(Duration.millis(300 + DELAY), kvX4, kvY4, kvRO4, kvO4);
KeyFrame kfO5 = new KeyFrame(Duration.millis(400 + DELAY), kvX5, kvY5);
return new Timeline(kfO1, kfO2, kfO3, kfO4, kfO5);
}
示例12: createSimpleItemCloseTimeLine
private Timeline createSimpleItemCloseTimeLine(final StackPane NODE, final double X, final double Y, final double DELAY) {
KeyValue kvX1 = new KeyValue(NODE.translateXProperty(), X);
KeyValue kvY1 = new KeyValue(NODE.translateYProperty(), Y);
KeyValue kvRC2 = new KeyValue(NODE.rotateProperty(), 360);
KeyValue kvX3 = new KeyValue(NODE.translateXProperty(), 1.0 * X, Interpolator.EASE_IN);
KeyValue kvY3 = new KeyValue(NODE.translateYProperty(), 1.0 * Y, Interpolator.EASE_IN);
KeyValue kvX4 = new KeyValue(NODE.translateXProperty(), 0.0);
KeyValue kvY4 = new KeyValue(NODE.translateYProperty(), 0.0);
KeyValue kvX5 = new KeyValue(NODE.translateXProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvY5 = new KeyValue(NODE.translateYProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvR5 = new KeyValue(NODE.rotateProperty(), 0, Interpolator.EASE_OUT);
KeyValue kvO5 = new KeyValue(NODE.opacityProperty(), 0.5);
KeyValue kvO6 = new KeyValue(NODE.opacityProperty(), 0);
KeyFrame kfC1 = new KeyFrame(Duration.millis(0), kvX1, kvY1);
KeyFrame kfC2 = new KeyFrame(Duration.millis(50 + DELAY), kvRC2);
KeyFrame kfC3 = new KeyFrame(Duration.millis(250 + DELAY), kvX3, kvY3);
KeyFrame kfC4 = new KeyFrame(Duration.millis(400 + DELAY), kvX4, kvY4);
KeyFrame kfC5 = new KeyFrame(Duration.millis(550 + DELAY), kvX5, kvY5, kvR5, kvO5);
KeyFrame kfC6 = new KeyFrame(Duration.millis(551 + DELAY), kvO6);
return new Timeline(kfC1, kfC2, kfC3, kfC4, kfC5, kfC6);
}
示例13: createIndeterminateTimeline
@Override
protected void createIndeterminateTimeline() {
if (indeterminateTransition != null) {
clearAnimation();
}
double dur = 1;
ProgressIndicator control = getSkinnable();
final double w = control.getWidth() - (snappedLeftInset() + snappedRightInset());
indeterminateTransition = new Timeline(new KeyFrame(
Duration.ZERO,
new KeyValue(clip.scaleXProperty(), 0.0, Interpolator.EASE_IN),
new KeyValue(clip.translateXProperty(), -w/2, Interpolator.LINEAR)
),
new KeyFrame(
Duration.seconds(0.5* dur),
new KeyValue(clip.scaleXProperty(), 0.4, Interpolator.LINEAR)
),
new KeyFrame(
Duration.seconds(0.9 * dur),
new KeyValue(clip.translateXProperty(), w/2, Interpolator.LINEAR)
),
new KeyFrame(
Duration.seconds(1 * dur),
new KeyValue(clip.scaleXProperty(), 0.0, Interpolator.EASE_OUT)
));
indeterminateTransition.setCycleCount(Timeline.INDEFINITE);
}
示例14: fadeIn
private Timeline fadeIn(Text word) {
word.setOpacity(0.1);
Timeline timeline = new Timeline();
KeyFrame key = new KeyFrame(Duration.millis(1000),
new KeyValue(word.opacityProperty(), 1, Interpolator.EASE_IN));
timeline.getKeyFrames().add(key);
return timeline;
}
示例15: animatedOpen
private void animatedOpen(final double ANIMATION_DURATION) {
KeyValue kvTranslateX0 = new KeyValue(contentPane.translateXProperty(), contentPane.getTranslateX(), Interpolator.EASE_IN);
KeyValue kvTranslateX1 = new KeyValue(contentPane.translateXProperty(), PREF_PANE_WIDTH, Interpolator.EASE_OUT);
KeyFrame kfBegin = new KeyFrame(Duration.ZERO, kvTranslateX0);
KeyFrame kfEnd = new KeyFrame(Duration.millis(ANIMATION_DURATION), kvTranslateX1);
timeline.getKeyFrames().setAll(kfBegin, kfEnd);
timeline.play();
timeline.setOnFinished(event -> {
manageNode(prefPane);
shadowOverlay.setVisible(false);
preparePaperfold();
});
}