.build(), JFXKeyValue.builder() .setTarget(radio.strokeProperty()) .setEndValueSupplier(() -> getSkinnable().isSelected() ? ((JFXRadioButton) getSkinnable()).getSelectedColor() : ((JFXRadioButton) getSkinnable()).getUnSelectedColor()) .setInterpolator(Interpolator.EASE_BOTH)
public static void incompatibleAnim(Node receiverConnector) { if (!(receiverConnector instanceof Circle)) { throw new IllegalArgumentException( "only" + Circle.class + "nodes are supported. Specified: " + receiverConnector); } Circle circleConnector = (Circle) receiverConnector; if (timeline != null) { timeline.stop(); } timeline = new Timeline(); final KeyValue kv2 = new KeyValue(circleConnector.fillProperty(), new Color(1, 0, 0, 0.80)); final KeyFrame kf2 = new KeyFrame(Duration.millis(500), kv2); timeline.getKeyFrames().add(kf2); final KeyValue kv3 = new KeyValue(circleConnector.strokeProperty(), new Color(1, 0, 0, 0.90)); final KeyFrame kf3 = new KeyFrame(Duration.millis(500), kv3); timeline.getKeyFrames().add(kf3); timeline.play(); } }
public static void unconnectAnim(Node n) { if (timeline != null) { timeline.stop(); } if (!(n instanceof Circle)) { return; } Circle circle = (Circle) n; circle.radiusProperty().unbind(); timeline = new Timeline(); timeline.setCycleCount(1); final KeyValue kv1 = new KeyValue(circle.radiusProperty(), 15); final KeyFrame kf1 = new KeyFrame(Duration.millis(250), kv1); timeline.getKeyFrames().add(kf1); final KeyValue kv2 = new KeyValue(circle.fillProperty(), new Color(120.0 / 255.0, 140.0 / 255.0, 1, 0.5)); final KeyFrame kf2 = new KeyFrame(Duration.millis(50), kv2); timeline.getKeyFrames().add(kf2); final KeyValue kv3 = new KeyValue(circle.strokeProperty(), new Color(120 / 255.0, 140 / 255.0, 1, 0.42)); final KeyFrame kf3 = new KeyFrame(Duration.millis(50), kv3); timeline.getKeyFrames().add(kf3); timeline.play(); }
timeline.getKeyFrames().add(kf1); final KeyValue kv2 = new KeyValue(connectedShape.strokeProperty(), new Color(0, 1, 0, 1.0)); final KeyFrame kf2 = new KeyFrame(Duration.millis(0), kv2); timeline.getKeyFrames().add(kf2); final KeyValue kv3 = new KeyValue(connectedShape.strokeProperty(), new Color(0, 1, 0, 0.0)); final KeyFrame kf3 = new KeyFrame(Duration.millis(400), kv3);
timeline.getKeyFrames().add(kf1); final KeyValue kv2 = new KeyValue(connectedShape.strokeProperty(), new Color(1, 0, 0, 1.0)); final KeyFrame kf2 = new KeyFrame(Duration.millis(0), kv2); timeline.getKeyFrames().add(kf2); final KeyValue kv3 = new KeyValue(connectedShape.strokeProperty(), new Color(1, 0, 0, 0.0)); final KeyFrame kf3 = new KeyFrame(Duration.millis(400), kv3); timeline.getKeyFrames().add(kf3);
.build(), JFXKeyValue.builder() .setTarget(radio.strokeProperty()) .setEndValueSupplier(() -> getSkinnable().isSelected() ? ((JFXRadioButton) getSkinnable()).getSelectedColor() : ((JFXRadioButton) getSkinnable()).getUnSelectedColor()) .setInterpolator(Interpolator.EASE_BOTH)