private void resetProperties() { overlayPane.setVisible(false); contentHolder.setTranslateX(0); contentHolder.setTranslateY(0); contentHolder.setScaleX(1); contentHolder.setScaleY(1); }
/** * ************************************************************************* * Transitions * * * ************************************************************************ */ private Transition getShowAnimation(DialogTransition transitionType) { Transition animation = null; if (contentHolder != null) { switch (transitionType) { case LEFT: contentHolder.setTranslateX(-offsetX); animation = new LeftTransition(); break; case RIGHT: contentHolder.setTranslateX(offsetX); animation = new RightTransition(); break; case TOP: contentHolder.setTranslateY(-offsetY); animation = new TopTransition(); break; case BOTTOM: contentHolder.setTranslateY(offsetY); animation = new BottomTransition(); break; default: contentHolder.setScaleX(0); contentHolder.setScaleY(0); animation = new CenterTransition(); break; } } if (animation != null) animation.setOnFinished( (finish) -> onDialogOpenedProperty.get().handle(new JFXDialogEvent(JFXDialogEvent.OPENED))); return animation; }