List of usage examples for javafx.scene.layout VBox getChildren
@Override
public ObservableList<Node> getChildren()
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox<String> choiceBox = new ChoiceBox<String>(); choiceBox.setItems(cursors);//from ww w . ja v a2 s .c o m choiceBox.show(); VBox box = new VBox(); box.getChildren().add(choiceBox); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox<String> choiceBox = new ChoiceBox<String>(); choiceBox.setItems(cursors);//from w w w .j a va 2 s. c o m System.out.println(choiceBox.valueProperty()); VBox box = new VBox(); box.getChildren().add(choiceBox); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox<String> choiceBox = new ChoiceBox<String>(); choiceBox.setItems(cursors);/* w ww . ja va 2 s . co m*/ choiceBox.setValue("a"); VBox box = new VBox(); box.getChildren().add(choiceBox); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox<String> choiceBox = new ChoiceBox<String>(); choiceBox.setItems(cursors);/* w ww .jav a 2 s .c o m*/ System.out.println(choiceBox.showingProperty()); VBox box = new VBox(); box.getChildren().add(choiceBox); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Button okBtn = new Button("OK"); Button cancelBtn = new Button("Cancel"); cancelBtn.setPrefWidth(100);//from ww w . j a va 2s. c om VBox root = new VBox(); root.getChildren().addAll(okBtn, cancelBtn); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("Overriding Node Sizes"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox<String> choiceBox = new ChoiceBox<String>(); choiceBox.setItems(cursors);/*w w w . j a va2 s . c o m*/ SingleSelectionModel ssm = choiceBox.getSelectionModel(); choiceBox.setSelectionModel(ssm); VBox box = new VBox(); box.getChildren().add(choiceBox); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox<String> choiceBox = new ChoiceBox<String>(cursors); StringConverter sc = new NumberStringConverter(); choiceBox.setConverter(sc);//w w w .j av a 2 s . c o m VBox box = new VBox(); box.getChildren().add(choiceBox); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { ChoiceBox choiceBoxRef = ChoiceBoxBuilder.create().items(cursors).build(); VBox box = new VBox(); box.getChildren().add(choiceBoxRef); final Scene scene = new Scene(box, 300, 250); scene.setFill(null);//from w ww.j a va 2s. c om stage.setScene(scene); stage.show(); scene.cursorProperty().bind(choiceBoxRef.getSelectionModel().selectedItemProperty()); }
From source file:Main.java
@Override public void start(Stage stage) { Text text = new Text("Transparent!"); text.setFont(new Font(40)); MotionBlur mb = new MotionBlur(); mb.setRadius(15.0);/*from w ww . j a va2 s . c o m*/ mb.setAngle(-30.0); text.setEffect(mb); VBox box = new VBox(); box.getChildren().add(text); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Text text = new Text("!"); text.setFont(new Font(40)); VBox box = new VBox(); box.getChildren().add(text); final Scene scene = new Scene(box, 300, 250); scene.setFill(null);//from w ww.j a v a 2 s .c o m stage.setScene(scene); stage.show(); stage.setOnCloseRequest(new EventHandler<WindowEvent>() { public void handle(WindowEvent we) { System.out.println("Stage is closing"); } }); stage.close(); }