Package javafx.scene.effect

Examples of javafx.scene.effect.DropShadow


    }

    public static void neonEffect(@Nonnull Node node, @Nonnull Color color) {
        Blend __effect_blend = new Blend();
        __effect_blend.setMode(BlendMode.MULTIPLY);
        DropShadow effect_drop_sh = new DropShadow();
        effect_drop_sh.setColor(color);
        effect_drop_sh.setRadius(2);
        effect_drop_sh.setSpread(0.2);
        effect_drop_sh.setOffsetX(2);
        effect_drop_sh.setOffsetY(2);
        __effect_blend.setBottomInput(effect_drop_sh);
        DropShadow drop_val = new DropShadow();
        drop_val.setColor(color);
        drop_val.setRadius(10);
        drop_val.setSpread(0.2);
        Blend blend_val_obj = new Blend();
        blend_val_obj.setMode(BlendMode.MULTIPLY);
        InnerShadow shadow_value = new InnerShadow();
        shadow_value.setColor(Color.web("#000000"));
        shadow_value.setChoke(0.7);
View Full Code Here


                .to(ImageType.PNG)
                .stream()
                .toByteArray();
        Image qrImage = new Image(new ByteArrayInputStream(imageBytes));
        ImageView view = new ImageView(qrImage);
        view.setEffect(new DropShadow());
        // Embed the image in a pane to ensure the drop-shadow interacts with the fade nicely, otherwise it looks weird.
        // Then fix the width/height to stop it expanding to fill the parent, which would result in the image being
        // non-centered on the screen. Finally fade/blur it in.
        Pane pane = new Pane(view);
        pane.setMaxSize(qrImage.getWidth(), qrImage.getHeight());
View Full Code Here

  }
 
  @Override
  public void start(Stage primaryStage) throws Exception {
    Button button = new Button("BindableTransition");
    DropShadow shadow = DropShadowBuilder.create().build();
    button.setEffect(shadow);
    button.setStyle("-fx-font-size: 32px;");
    final Duration duration = Duration.millis(1200);
    BindableTransition transition = new BindableTransition(duration);
    transition.setCycleCount(1000);
    transition.setAutoReverse(true);
    shadow.offsetXProperty().bind(transition.fractionProperty().multiply(32));
    shadow.offsetYProperty().bind(transition.fractionProperty().multiply(32));
    button.translateXProperty().bind(transition.fractionProperty().multiply(-32));
    transition.play();
   
    StackPane pane = new StackPane();
    pane.getChildren().add(button);
View Full Code Here

        });

        control.selectedProperty().addListener(
                (ObservableValue<? extends Boolean> ov, Boolean oldValue, Boolean newValue) -> {
            if (newValue) {
                DropShadow shadow = new DropShadow(20, Color.WHITE);
                Glow effect = new Glow(0.5);
//                    shadow.setInput(effect);
                control.setEffect(effect);
            } else {
                control.setEffect(null);
View Full Code Here

        innerFocus.setRadius(6.5);
        innerFocus.setChoke(0.7);
        innerFocus.setOffsetX(0.0);
        innerFocus.setOffsetY(0.0);

        DropShadow outerFocus = new DropShadow();
        outerFocus.setColor(Color.rgb(104, 155, 201));
        outerFocus.setBlurType(BlurType.ONE_PASS_BOX);
        outerFocus.setRadius(7.0);
        outerFocus.setSpread(0.7);
        outerFocus.setOffsetX(0.0);
        outerFocus.setOffsetY(0.0);
        outerFocus.setInput(innerFocus);

        for (Node child : getChildren()) {
            if (child instanceof StackPane) {
                child.setEffect(outerFocus);
            }
View Full Code Here

        innerFocus.setRadius(6.5);
        innerFocus.setChoke(0.7);
        innerFocus.setOffsetX(0.0);
        innerFocus.setOffsetY(0.0);

        DropShadow outerFocus = new DropShadow();
        outerFocus.setColor(Color.rgb(104, 155, 201));
        outerFocus.setBlurType(BlurType.ONE_PASS_BOX);
        outerFocus.setRadius(5.0);
        outerFocus.setSpread(0.6);
        outerFocus.setOffsetX(0.0);
        outerFocus.setOffsetY(0.0);
        outerFocus.setInput(innerFocus);

        for (Node child : getChildren()) {
            if (child instanceof StackPane) {
                child.setEffect(outerFocus);
            }
View Full Code Here

            if (controlButtonPrefWidth > 0) {
                controlButtonPrefWidth = controlButtonPrefWidth + SPACER;
            }

            if (headersRegion.getEffect() instanceof DropShadow) {
                DropShadow shadow = (DropShadow)headersRegion.getEffect();
                shadowRadius = shadow.getRadius();
            }

            maxWidth = snapSize(getWidth()) - controlButtonPrefWidth - clipOffset;
            if (tabPosition.equals(Side.LEFT) || tabPosition.equals(Side.BOTTOM)) {
                if (headersPrefWidth < maxWidth) {
View Full Code Here

        progressText = new Label();
        splashLayout = new VBox();
        splashLayout.getChildren().addAll(splash, loadProgress, progressText);
        progressText.setAlignment(Pos.CENTER);
        splashLayout.getStylesheets().add(BundleUtils.getStylesheet("css_splash"));
        splashLayout.setEffect(new DropShadow());
    }
View Full Code Here

    private void initGraphics() {
        setMouseTransparent(true);
        canvas            = new Canvas(getPrefWidth(), getPrefHeight());
        ctx               = canvas.getGraphicsContext2D();
        DropShadow shadow = new DropShadow();
        shadow.setRadius(3);
        shadow.setColor(Color.rgb(0, 0, 0, 0.3));
        shadow.setBlurType(BlurType.TWO_PASS_BOX);
        shadow.setOffsetY(1);
        canvas.setEffect(shadow);

        getChildren().setAll(canvas);
    }
View Full Code Here

                tick.getStyleClass().setAll(minorTickStyleClass);
            }
            ticks.add(tick);
        }

        DropShadow dropShadow = new DropShadow();
        dropShadow.setColor(Color.rgb(0, 0, 0, 0.65));
        dropShadow.setRadius(1.5);
        dropShadow.setBlurType(BlurType.TWO_PASS_BOX);
        dropShadow.setOffsetY(1);

        tickMarkGroup = new Group();
        tickMarkGroup.setEffect(dropShadow);
        tickMarkGroup.getChildren().setAll(ticks);

        tickLabelGroup = new Group();
        tickLabelGroup.setEffect(dropShadow);
        tickLabelGroup.getChildren().setAll(tickLabels);
        tickLabelGroup.setOpacity(Clock.Design.BRAUN == getSkinnable().getDesign() ? 1 : 0);

        minutePointer = new Region();
        if (Clock.Design.IOS6 == getSkinnable().getDesign()) {
            minutePointer.getStyleClass().setAll("hour-pointer-ios6");
        } else if (Clock.Design.DB == getSkinnable().getDesign()) {
            minutePointer.getStyleClass().setAll("hour-pointer-db");
        } else if (Clock.Design.BRAUN == getSkinnable().getDesign()) {
            minutePointer.getStyleClass().setAll("hour-pointer-braun");
        } else if (Clock.Design.BOSCH == getSkinnable().getDesign()) {
            minutePointer.getStyleClass().setAll("hour-pointer-bosch");
        }
        minutePointer.getTransforms().setAll(minuteRotate);

        minutePointerFlour = new Region();
        minutePointerFlour.getStyleClass().setAll("hour-pointer-braun-flour");
        if (Clock.Design.BRAUN == getSkinnable().getDesign()) {
            minutePointerFlour.setOpacity(1);
        } else {
            minutePointerFlour.setOpacity(0);
        }
        minutePointerFlour.getTransforms().setAll(minuteRotate);

        hourPointer = new Region();
        if (Clock.Design.IOS6 == getSkinnable().getDesign()) {
            hourPointer.getStyleClass().setAll("minute-pointer-ios6");
        } else if (Clock.Design.DB == getSkinnable().getDesign()) {
            hourPointer.getStyleClass().setAll("minute-pointer-db");
        } else if (Clock.Design.BRAUN == getSkinnable().getDesign()) {
            hourPointer.getStyleClass().setAll("minute-pointer-braun");
        } else if (Clock.Design.BOSCH == getSkinnable().getDesign()) {
            hourPointer.getStyleClass().setAll("minute-pointer-bosch");
        }
        hourPointer.getTransforms().setAll(hourRotate);

        hourPointerFlour = new Region();
        hourPointerFlour.getStyleClass().setAll("minute-pointer-braun-flour");
        if (Clock.Design.BRAUN == getSkinnable().getDesign()) {
            hourPointerFlour.setOpacity(1);
        } else {
            hourPointerFlour.setOpacity(0);
        }
        hourPointerFlour.getTransforms().setAll(hourRotate);

        DropShadow pointerShadow = new DropShadow();
        pointerShadow.setColor(Color.rgb(0, 0, 0, 0.45));
        pointerShadow.setRadius(12);
        pointerShadow.setBlurType(BlurType.TWO_PASS_BOX);
        pointerShadow.setOffsetY(6);

        pointerGroup = new Group();
        pointerGroup.setEffect(pointerShadow);
        pointerGroup.getChildren().setAll(hourPointerFlour, hourPointer, minutePointerFlour, minutePointer);

        secondPointer = new Region();
        secondPointer.setOpacity(1);
        if (Clock.Design.IOS6 == getSkinnable().getDesign()) {
            secondPointer.getStyleClass().setAll("second-pointer-ios6");
        } else if (Clock.Design.DB == getSkinnable().getDesign()) {
            secondPointer.getStyleClass().setAll("second-pointer-db");
        } else if (Clock.Design.BRAUN == getSkinnable().getDesign()) {
            secondPointer.getStyleClass().setAll("second-pointer-braun");
        } else if (Clock.Design.BOSCH == getSkinnable().getDesign()) {
            secondPointer.setOpacity(0);
        }
        secondPointer.getTransforms().setAll(secondRotate);

        InnerShadow secondPointerInnerShadow = new InnerShadow();
        secondPointerInnerShadow.setColor(Color.rgb(0, 0, 0, 0.3));
        secondPointerInnerShadow.setRadius(1);
        secondPointerInnerShadow.setBlurType(BlurType.TWO_PASS_BOX);
        secondPointerInnerShadow.setOffsetY(-1);

        InnerShadow secondPointerInnerHighlight = new InnerShadow();
        secondPointerInnerHighlight.setColor(Color.rgb(255, 255, 255, 0.3));
        secondPointerInnerHighlight.setRadius(1);
        secondPointerInnerHighlight.setBlurType(BlurType.TWO_PASS_BOX);
        secondPointerInnerHighlight.setOffsetY(1);
        secondPointerInnerHighlight.setInput(secondPointerInnerShadow);

        DropShadow secondPointerShadow = new DropShadow();
        secondPointerShadow.setColor(Color.rgb(0, 0, 0, 0.45));
        secondPointerShadow.setRadius(12);
        secondPointerShadow.setBlurType(BlurType.TWO_PASS_BOX);
        secondPointerShadow.setOffsetY(6);
        secondPointerShadow.setInput(secondPointerInnerHighlight);

        secondPointerGroup = new Group();
        secondPointerGroup.setEffect(secondPointerShadow);
        secondPointerGroup.getChildren().setAll(secondPointer);
        secondPointerGroup.setOpacity(getSkinnable().isSecondPointerVisible() ? 1 : 0);
View Full Code Here

TOP

Related Classes of javafx.scene.effect.DropShadow

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.