Java Code Examples for javafx.scene.layout.VBox#setLayoutY()
The following examples show how to use
javafx.scene.layout.VBox#setLayoutY() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NodePropertiesSample.java From marathonv5 with Apache License 2.0 | 5 votes |
private HBox createRadioButtons() { //creates a radio buttons, for each rectangle 2 buttons with action .toFront() and toBack() ToggleGroup tg = new ToggleGroup(); VBox vBox1 = new VBox(); vBox1.setSpacing(5); vBox1.setLayoutY(6); vBox1.getChildren().addAll( createRadioButton(rectA, "A.toFront()", true, tg), createRadioButton(rectB, "B.toFront()", true, tg), createRadioButton(rectC, "C.toFront()", true, tg) ); VBox vBox2 = new VBox(); vBox2.setSpacing(5); vBox2.setLayoutY(6); vBox2.getChildren().addAll( createRadioButton(rectA, "A.toBack()", false, tg), createRadioButton(rectB, "B.toBack()", false, tg), createRadioButton(rectC, "C.toBack()", false, tg) ); HBox hBox = new HBox(); hBox.setSpacing(10); hBox.getChildren().addAll(vBox1, vBox2); return hBox; }
Example 2
Source File: NodePropertiesSample.java From marathonv5 with Apache License 2.0 | 5 votes |
private HBox createRadioButtons() { //creates a radio buttons, for each rectangle 2 buttons with action .toFront() and toBack() ToggleGroup tg = new ToggleGroup(); VBox vBox1 = new VBox(); vBox1.setSpacing(5); vBox1.setLayoutY(6); vBox1.getChildren().addAll( createRadioButton(rectA, "A.toFront()", true, tg), createRadioButton(rectB, "B.toFront()", true, tg), createRadioButton(rectC, "C.toFront()", true, tg) ); VBox vBox2 = new VBox(); vBox2.setSpacing(5); vBox2.setLayoutY(6); vBox2.getChildren().addAll( createRadioButton(rectA, "A.toBack()", false, tg), createRadioButton(rectB, "B.toBack()", false, tg), createRadioButton(rectC, "C.toBack()", false, tg) ); HBox hBox = new HBox(); hBox.setSpacing(10); hBox.getChildren().addAll(vBox1, vBox2); return hBox; }