本文整理汇总了Java中javafx.scene.layout.VBox.setLayoutY方法的典型用法代码示例。如果您正苦于以下问题:Java VBox.setLayoutY方法的具体用法?Java VBox.setLayoutY怎么用?Java VBox.setLayoutY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.layout.VBox
的用法示例。
在下文中一共展示了VBox.setLayoutY方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRadioButtons
import javafx.scene.layout.VBox; //导入方法依赖的package包/类
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;
}
示例2: LosePresentation
import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public LosePresentation(){
vbButtons = new VBox(20);
vbButtons.setLayoutY(200);
vbButtons.setLayoutX(500);
vbButtons.setSpacing(20);
vbButtons.setPadding(new Insets(0, 20, 10, 20));
vbTexts = new VBox(20);
vbTexts.setLayoutY(20);
vbButtons.setLayoutX(100);
vbTexts.setSpacing(20);
vbTexts.setPadding(new Insets(0, 20, 10, 20));
}
示例3: WinPresentation
import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public WinPresentation(){
vbButtons = new VBox(20);
vbButtons.setLayoutY(200);
vbButtons.setLayoutX(500);
vbButtons.setSpacing(20);
vbButtons.setPadding(new Insets(0, 20, 10, 20));
vbTexts = new VBox(20);
vbTexts.setLayoutY(20);
vbButtons.setLayoutX(100);
vbTexts.setSpacing(20);
vbTexts.setPadding(new Insets(0, 20, 10, 20));
}
示例4: createScene
import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private Scene createScene() {
Group root = new Group();
Scene scene = new Scene(root, App.WIDTH, App.HEIGHT);
VBox vBox = new VBox();
//borderPane.setCenter(vBox);
root.getChildren().add(vBox);
vBox.setLayoutX(250);
vBox.setLayoutY(100);
// vBox.getChildren().addAll(createPresetButtons());
vBox.getChildren().add(createGameFileChooserButton());
return scene;
}
示例5: show
import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public void show(){
Group root = new Group();
Scene scene = new Scene(root, WIDTH, HEIGHT);
scene.getStylesheets().setAll("/styleSheets/login.css");
Image backgroundImage = new Image(getClass().getClassLoader().getResourceAsStream(myResources.getString("loaderImagePath")));
scene.setFill(new ImagePattern(backgroundImage));
// Bind the timerLabel text property to the timeSeconds property
timerLabel.textProperty().bind(timeSeconds.divide(100).asString());
timerLabel.setId("label");
ProgressBar progressBar = new ProgressBar();
progressBar.progressProperty().bind(
timeSeconds.divide(START_TIME*100.0).subtract(1).multiply(-1));
timeSeconds.set((START_TIME)*100);
timelineController();
Label loadingLabel =new Label("Game loading ...");
loadingLabel.setId("label");
VBox vb = new VBox(20);
// center the components within VBox
vb.setAlignment(Pos.CENTER);
vb.setPrefWidth(scene.getWidth());
vb.setLayoutY(60);
vb.getChildren().addAll( timerLabel, progressBar, loadingLabel);
root.getChildren().add(vb);
scene.getStylesheets().setAll(CSS_LOCATION);
primaryStage.setScene(scene);
primaryStage.show();
}