Package javafx.animation

Examples of javafx.animation.Animation


     */
    private ParallelTransition buildSlideTransition(final boolean isReverse, final SlideModel<SlideStep> previousSlideModel, final SlideModel<SlideStep> selectedSlideModel) {
        final ParallelTransition slideAnimation = ParallelTransitionBuilder.create().build();

        if (previousSlideModel != null) {
            final Animation a = isReverse ? previousSlideModel.getShowAnimation() : previousSlideModel.getHideAnimation();
            if (a != null) {
                slideAnimation.getChildren().add(a);
            }
        }
        if (this.selectedSlideModel != null) {
            final Animation a = isReverse ? this.selectedSlideModel.getHideAnimation() : this.selectedSlideModel.getShowAnimation();
            if (a != null) {
                slideAnimation.getChildren().add(a);
            }
        }

View Full Code Here


     * @param animationType the type of the animation to build
     *
     * @return the animation
     */
    private Animation buildAnimation(final AnimationType animationType) {
        Animation animation = null;
        switch (animationType) {

            case MOVE_TO_RIGHT:
                animation = buildHorizontalAnimation(0, 2000, 0, 0);
                break;
View Full Code Here

            } else if (Animation.class.isAssignableFrom(property.getType())
                    && OnFinished.class.getName().equals(a.annotationType().getName())) {

                try {
                    // Retrieve the property value
                    final Animation animation = (Animation) property.get(this);

                    // Process the annotation if the node is not null
                    if (animation != null && getController() instanceof AbstractController) {
                        addHandler(animation, a);
                    }
View Full Code Here

  final FadeTransition fade = FadeTransitionBuilder.create()
    .node(this.itemGroup).duration(Duration.millis(400))
    .fromValue(0).toValue(1.0).build();
  anim.add(fade);

  final Animation offset = new Timeline(new KeyFrame(Duration.ZERO,
    new KeyValue(this.offsetProperty(), 0)), new KeyFrame(
    Duration.millis(300), new KeyValue(this.offsetProperty(),
      this.lastOffsetValue)));
  anim.add(offset);

  final Animation angle = new Timeline(new KeyFrame(Duration.ZERO,
    new KeyValue(this.initialAngleProperty(),
      this.lastInitialAngleValue + 20)), new KeyFrame(
    Duration.millis(300), new KeyValue(this.initialAngleProperty(),
      this.lastInitialAngleValue)));
  anim.add(angle);
View Full Code Here

        @Nullable
        public Animation done() {
            checkGuiThread();
            if (ui == null) return null// In the middle of being dismissed and got an extra click.
            explodeOut(ui);
            Animation animation = fadeOutAndRemove(uiStack, ui, stopClickPane);
            for (EventHandler<ActionEvent> handler : afterFade) {
                EventHandler<ActionEvent> prev = animation.getOnFinished();
                animation.setOnFinished(ev -> {
                    prev.handle(ev);
                    handler.handle(ev);
                });
            }
            if (slowGFX) {
View Full Code Here

        .fromY(0.2)
        .toX(0.7)
        .toY(0.7)
        .interpolator(Interpolator.EASE_BOTH);
     
      Animation main = ParallelTransitionBuilder.create()
          .children(
            zoomOut.node(curNode).build(),
            zoomIn.node(newNode).build(),
            moveIn.build(),
            moveOut.build()
View Full Code Here

   
    if (imageView != null) {
      pane.getChildren().add(0,imageView);
    }
   
    Animation animation = createAndPrepareAnimation(curNode, newNode);
   
    animation.onFinishedProperty().set(new EventHandler<ActionEvent>() {
     
      @Override
      public void handle(ActionEvent event) {
        pane.getChildren().remove(curNode);
        pane.getChildren().remove(newNode);
        pane.setCenter(newNode);
        resetProperties(curNode, newNode);
       
        if (imageView != null) {
          pane.getChildren().remove(imageView);
        }
      }
    });
   
    animation.play();
   
  }
View Full Code Here

   
    if (imageView != null) {
      pane.getChildren().add(0,imageView);
    }
   
    Animation animation = createAndPrepareAnimation(area, null);
   
    animation.onFinishedProperty().set(new EventHandler<ActionEvent>() {
     
      @Override
      public void handle(ActionEvent event) {
        pane.getChildren().remove(curNode);
        pane.getChildren().remove(newNode);
        pane.setCenter(newNode);
        resetProperties(curNode, newNode);
       
        if (imageView != null) {
          pane.getChildren().remove(imageView);
        }
      }
    });
   
    animation.play();
  }
View Full Code Here

TOP

Related Classes of javafx.animation.Animation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.