use of javafx.animation.Timeline in project JFoenix by jfoenixadmin.
the class JFXTreeCell method animateChild.
private void animateChild(int i, JFXTreeView<T> jfxTreeView) {
Timeline createChildAnimation = createChildAnimation(this, i - jfxTreeView.animateRow - 1);
if (jfxTreeView.childrenAnimationMap.containsKey(i)) {
jfxTreeView.trans.getChildren().remove(jfxTreeView.childrenAnimationMap.get(i).getAnimation());
jfxTreeView.childrenAnimationMap.get(i).getCell().clearCellAnimation();
}
jfxTreeView.childrenAnimationMap.put(i, new CellAnimation(this, createChildAnimation));
jfxTreeView.trans.getChildren().add(createChildAnimation);
}
use of javafx.animation.Timeline in project JFoenix by jfoenixadmin.
the class JFXTreeCell method createSibAnimation.
private Timeline createSibAnimation(TreeCell<?> cell, int index) {
cell.setTranslateY(((JFXTreeView<T>) getTreeView()).height);
Timeline f2 = new Timeline(new KeyFrame(Duration.millis(120), new KeyValue(cell.translateYProperty(), 0, Interpolator.EASE_BOTH)));
return f2;
}
use of javafx.animation.Timeline in project JFoenix by jfoenixadmin.
the class JFXTreeCell method createChildAnimation.
private Timeline createChildAnimation(TreeCell<?> cell, int delay) {
cell.setOpacity(0);
cell.setTranslateY(-1);
Timeline f1 = new Timeline(new KeyFrame(Duration.millis(120), new KeyValue(cell.opacityProperty(), 1, Interpolator.EASE_BOTH), new KeyValue(cell.translateYProperty(), 0, Interpolator.EASE_BOTH)));
f1.setDelay(Duration.millis(20 + delay * 10));
return f1;
}
use of javafx.animation.Timeline in project JFoenix by jfoenixadmin.
the class JFXProgressBarSkin method createIndeterminateTimeline.
@Override
protected void createIndeterminateTimeline() {
super.createIndeterminateTimeline();
if (indeterminateTransition != null)
indeterminateTransition.stop();
ProgressIndicator control = getSkinnable();
final double w = control.getWidth() - (snappedLeftInset() + snappedRightInset());
final double bWidth = bar.getWidth();
indeterminateTransition = new Timeline(new KeyFrame(Duration.ZERO, new KeyValue(bar.scaleXProperty(), 0, Interpolator.EASE_IN), new KeyValue(bar.translateXProperty(), -bWidth, Interpolator.LINEAR)), new KeyFrame(Duration.seconds(0.5), new KeyValue(bar.scaleXProperty(), 3, Interpolator.LINEAR), new KeyValue(bar.translateXProperty(), w / 2, Interpolator.LINEAR)), new KeyFrame(Duration.seconds(1), new KeyValue(bar.scaleXProperty(), 0, Interpolator.EASE_OUT), new KeyValue(bar.translateXProperty(), w, Interpolator.LINEAR)));
indeterminateTransition.setCycleCount(Timeline.INDEFINITE);
}
use of javafx.animation.Timeline in project JFoenix by jfoenixadmin.
the class JFXRadioButtonOldSkin method initializeComponents.
private void initializeComponents(final double x, final double y, final double w, final double h) {
radio.setStroke(unSelectedColor);
getSkinnable().selectedProperty().addListener((o, oldVal, newVal) -> {
rippler.setRipplerFill(newVal ? unSelectedColor : selectedColor);
timeline.setRate(newVal ? 1 : -1);
timeline.play();
});
rippler.setRipplerFill(getSkinnable().isSelected() ? unSelectedColor : selectedColor);
timeline = new Timeline(new KeyFrame(Duration.ZERO, new KeyValue(dot.radiusProperty(), minRadius, Interpolator.EASE_BOTH)), new KeyFrame(Duration.millis(200), new KeyValue(dot.radiusProperty(), radioRadius + radio.getStrokeWidth() / 2, Interpolator.EASE_BOTH)));
rippler.setRipplerFill(getSkinnable().isSelected() ? unSelectedColor : selectedColor);
timeline.setRate(getSkinnable().isSelected() ? 1 : -1);
timeline.play();
}
Aggregations