List of usage examples for javafx.scene.effect DropShadow DropShadow
public DropShadow()
From source file:Main.java
@Override public void start(Stage stage) { Button b1 = new Button("Close"); b1.setEffect(new DropShadow()); VBox root = new VBox(); root.getChildren().addAll(b1);/* w w w. j ava 2 s.com*/ Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("Testing LayoutBounds"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Button b1 = new Button("Close"); b1.setEffect(new DropShadow()); Button b3 = new Button("Close"); b3.setEffect(new DropShadow()); b3.setRotate(30);/*w w w .j av a 2 s . c o m*/ VBox root = new VBox(); root.getChildren().addAll(b1, b3); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("Testing LayoutBounds"); stage.show(); System.out.println("b1=" + b1.getLayoutBounds()); System.out.println("b3=" + b3.getLayoutBounds()); }
From source file:Main.java
@Override public void start(Stage stage) { Button b1 = new Button("Close"); b1.setEffect(new DropShadow()); Button b2 = new Button("Close"); Button b3 = new Button("Close"); b3.setEffect(new DropShadow()); b3.setRotate(30);/*from ww w . j a va2 s . c o m*/ Button b4 = new Button("Close"); VBox root = new VBox(); root.getChildren().addAll(b1, b2, b3, b4); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("Testing LayoutBounds"); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); DropShadow ds = new DropShadow(); ds.setOffsetY(3.0);// w ww .jav a 2s . c o m ds.setColor(Color.color(0.4, 0.4, 0.4)); Ellipse ellipse = new Ellipse(); ellipse.setCenterX(50.0f); ellipse.setCenterY(50.0f); ellipse.setRadiusX(50.0f); ellipse.setRadiusY(25.0f); ellipse.setEffect(ds); g.getChildren().add(ellipse); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); DropShadow ds = new DropShadow(); ds.setOffsetY(3.0);/*from w w w . j a v a 2 s. c o m*/ ds.setColor(Color.color(0.4, 0.4, 0.4)); Ellipse ellipse = new Ellipse(); ellipse.setCenterX(50.0f); ellipse.setCenterY(50.0f); ellipse.setRadiusX(50.0f); ellipse.setRadiusY(25.0f); ellipse.setEffect(ds); FillTransition ft = new FillTransition(Duration.millis(3000), ellipse, Color.RED, Color.BLUE); ft.setAutoReverse(true); ft.play(); g.getChildren().add(ellipse); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); DropShadow ds = new DropShadow(); ds.setOffsetY(3.0);/*from w ww . j a v a2 s . c o m*/ ds.setColor(Color.color(0.4, 0.4, 0.4)); Ellipse ellipse = new Ellipse(); ellipse.setCenterX(50.0f); ellipse.setCenterY(50.0f); ellipse.setRadiusX(50.0f); ellipse.setRadiusY(25.0f); ellipse.setEffect(ds); FadeTransition ft = new FadeTransition(Duration.millis(3000), ellipse); ft.setFromValue(1.0); ft.setToValue(0.3); ft.setAutoReverse(true); ft.play(); g.getChildren().add(ellipse); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); DropShadow ds1 = new DropShadow(); ds1.setOffsetY(4.0);//from ww w.j ava2 s . c o m Circle c = new Circle(); c.setEffect(ds1); c.setCenterX(50.0); c.setCenterY(125.0); c.setRadius(30.0); c.setFill(Color.RED); c.setCache(true); g.getChildren().add(c); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); DropShadow ds = new DropShadow(); ds.setOffsetY(3.0);// www .j av a2 s . c o m ds.setColor(Color.color(0.4, 0.4, 0.4)); Text t = new Text(); t.setEffect(ds); t.setCache(true); t.setX(10.0); t.setY(70.0); t.setFill(Color.RED); t.setText("JavaFX drop shadow..."); t.setFont(Font.font(null, FontWeight.BOLD, 32)); g.getChildren().add(t); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Text t1 = new Text("Drop Shadow!"); t1.setFont(Font.font(24));//from w w w . j a va 2 s. com t1.setEffect(new DropShadow()); Text t2 = new Text("Blur!"); t2.setFont(Font.font(24)); t2.setEffect(new BoxBlur()); Text t3 = new Text("Glow!"); t3.setFont(Font.font(24)); t3.setEffect(new Glow()); Text t4 = new Text("Bloom!"); t4.setFont(Font.font("Arial", FontWeight.BOLD, 24)); t4.setFill(Color.WHITE); t4.setEffect(new Bloom(0.10)); Rectangle rect = new Rectangle(100, 30, Color.GREEN); StackPane spane = new StackPane(rect, t4); HBox root = new HBox(t1, t2, t3, spane); root.setSpacing(20); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("Applying Effects"); stage.show(); }
From source file:ExcelFx.InitalDataController.java
@FXML protected void okButton(ActionEvent event) throws IOException { DropShadow ds = new DropShadow(); ds.setColor(Color.RED);//from w w w . jav a 2s . c o m String err = ""; if (initalField.getText().length() == 0) { err += " "; initalField.setEffect(ds); } if (initalPage.getText().length() == 0) { err += " ? excel "; initalPage.setEffect(ds); } if (yStart.getText().length() == 0) { err += " ? "; yStart.setEffect(ds); } if (yEnd.getText().length() == 0) { err += " ? "; yEnd.setEffect(ds); } if (err.length() != 0) { Alert alert = new Alert(Alert.AlertType.INFORMATION); alert.setTitle(""); alert.setHeaderText("? ?"); alert.setContentText(err); alert.showAndWait(); } else { Stage stage = (Stage) gridPane.getScene().getWindow(); stage.close(); this.codes.setPatch(this.initalField.getText()); this.codes.setPage((this.initalPage.getText()).trim().toLowerCase()); this.codes.setYStart(this.yStart.getText().trim().toLowerCase()); this.codes.setYEnd(this.yEnd.getText().trim().toLowerCase()); this.codes.jsonCreate("inital.json"); } this.gridPane.setUserData(this.codes); }