Examples of SVGPath


Examples of javafx.scene.shape.SVGPath

                .id("button-gradient-rect")
                .build();
        button.getChildren().add(gradientRect);

        // build arrowBlurShadow
        SVGPath arrowBlurShadow = SVGPathBuilder.create()
                .fill(Color.BLACK)
                .effect(new GaussianBlur(5))
                .transforms(scale)
                .content("m 17.40912,2.47162 c -8.27303,0 -14.9375,7.04253 -14.9375,15.78125 l 0,59.9375 c 0,8.73872 6.66447,15.75 14.9375,15.75 l 84.625,0 c 8.27303,0 14.9375,-7.01128 14.9375,-15.75 l 0,-59.9375 c 0,-8.73872 -6.66447,-15.78125 -14.9375,-15.78125 l -84.625,0 z m 45.0625,18.15625 27.5625,27.59375 -27.5625,27.5625 0,-15.5625 -33.0625,0 0,-24 33.0625,0 0,-15.59375 z")
                .id("#button-arrow-blur-shadow")
                .build();
        button.getChildren().add(arrowBlurShadow);

        // build arrowStencilCrisp
        SVGPath arrowStencilCrisp = SVGPathBuilder.create()
                .content("m 17.40912,0.47162 c -8.27303,0 -14.9375,7.04253 -14.9375,15.78125 l 0,59.9375 c 0,8.73872 6.66447,15.75 14.9375,15.75 l 84.625,0 c 8.27303,0 14.9375,-7.01128 14.9375,-15.75 l 0,-59.9375 c 0,-8.73872 -6.66447,-15.78125 -14.9375,-15.78125 l -84.625,0 z m 45.0625,18.15625 27.5625,27.59375 -27.5625,27.5625 0,-15.5625 -33.0625,0 0,-24 33.0625,0 0,-15.59375 z")
                .fill(CONTROL.getButtonColor())
                .id("#button-arrow-stencil-crisp")
                .transforms(scale)
                .build();
        button.getChildren().add(arrowStencilCrisp);

        // build glareRect
        SVGPath glareRect = SVGPathBuilder.create()
                .content("m 17.83252,1.67757 c -8.27303,0 -14.9375,7.21042 -14.9375,16.15746 l 0,28.31557 114.5,0 0,-28.31557 c 0,-8.94704 -6.66447,-16.15746 -14.9375,-16.15746 l -84.625,0 z")
                .fill(LinearGradientBuilder.create()
                        .proportional(true)
                        .startX(0)
                        .startY(1)
                        .endX(0)
                        .endY(0)
                        .stops(new Stop(0, Color.web("f4f4f4", 0.60)),
                                new Stop(1, Color.web("ffffff", 0.2063063)))
                        .build()
                )
                .id("#button-arrow-glare-rect")
                .transforms(scale)
                .build();
        glareRect.visibleProperty().bind(CONTROL.buttonGlareVisibleProperty()); // red button
        button.getChildren().add(glareRect);
        button.setCache(true);
    }
View Full Code Here

Examples of javafx.scene.shape.SVGPath

                    public void handle(ActionEvent event) {
                        AnchorPane content2 = new AnchorPane();
                        content2.setStyle("-fx-background-color: green");
                        content2.setPrefSize(300, 300);

                        SVGPath icon = new SVGPath();
                        icon.setContent("M0,0 L10,0 L10,10 L0,10 Z");
                        icon.setStyle("-fx-fill: green;");
                        bar.addItem("Item 2", icon, content2);
                        bp.setCenter(content2);
                    }
                });

                AnchorPane content1 = new AnchorPane();
                content1.setStyle("-fx-background-color: blue");
                content1.setPrefSize(300, 300);
                content1.getChildren().add(btn2);

                SVGPath icon = new SVGPath();
                icon.setContent("M0,0 L10,0 L10,10 L0,10 Z");
                icon.setStyle("-fx-fill: blue;");
                bar.addItem("Item 1", icon, content1);               
                bp.setCenter(content1);
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.