List of usage examples for javafx.scene Group Group
public Group()
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(); Text t = new Text(); t.setX(10.0);/* www .j ava 2s.co m*/ t.setY(40.0); t.setCache(true); t.setText("Blurry Text"); t.setFill(Color.RED); t.setFont(Font.font(null, FontWeight.BOLD, 36)); t.setEffect(new GaussianBlur()); g.getChildren().add(t); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(); emailComboBox.setItems(list);/*from w w w .j a v a 2 s . com*/ emailComboBox.setValue("A"); GridPane grid = new GridPane(); grid.setVgap(4); grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group g = new Group(); final Scene scene = new Scene(g, 300, 250); scene.setFill(null);//from ww w . j av a 2s . c o m Light.Spot light = new Light.Spot(); light.setX(0); light.setY(100); light.setZ(50); light.setPointsAtX(400); light.setPointsAtY(0); light.setPointsAtZ(0); light.setSpecularExponent(2); Lighting l = new Lighting(); l.setLight(light); l.setSurfaceScale(5.0); Text t = new Text(); t.setText("Spot"); t.setFill(Color.RED); t.setFont(Font.font(null, FontWeight.BOLD, 90)); t.setX(10.0); t.setY(10.0); t.setTextOrigin(VPos.TOP); t.setEffect(l); Rectangle r = new Rectangle(); r.setFill(Color.BLACK); g.getChildren().add(r); g.getChildren().add(t); r.setWidth(t.getLayoutBounds().getWidth() + 30); r.setHeight(t.getLayoutBounds().getHeight() + 20); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.getConverter()); GridPane grid = new GridPane(); grid.setVgap(4);/* w w w. j av a2s. c o m*/ grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.getEditor()); GridPane grid = new GridPane(); grid.setVgap(4);/* www . ja v a 2 s . c om*/ grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.getSelectionModel().getSelectedIndex()); GridPane grid = new GridPane(); grid.setVgap(4);//from w w w. ja v a2 s .c om grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.getButtonCell()); GridPane grid = new GridPane(); grid.setVgap(4);//w w w . j a v a 2 s . c o m grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.editorProperty()); GridPane grid = new GridPane(); grid.setVgap(4);/*w w w. ja va 2 s. c om*/ grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.cellFactoryProperty()); GridPane grid = new GridPane(); grid.setVgap(4);/*ww w. j a v a 2 s. co m*/ grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.selectionModelProperty()); GridPane grid = new GridPane(); grid.setVgap(4);//from w w w .ja v a 2s . c o m grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }