本文整理汇总了Java中javafx.scene.layout.VBox.setLayoutX方法的典型用法代码示例。如果您正苦于以下问题:Java VBox.setLayoutX方法的具体用法?Java VBox.setLayoutX怎么用?Java VBox.setLayoutX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.layout.VBox
的用法示例。
在下文中一共展示了VBox.setLayoutX方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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));
}
示例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: 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;
}
示例4: setRightBlock
import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public VBox setRightBlock(){
VBox jobb = new VBox(10);
jobb.setSpacing(10);
jobb.setPrefWidth(200);
jobb.setPrefHeight(500);
jobb.setLayoutX(WIDTH-200);
Button gomb = new Button("Játék újrakezdése");
gomb.setPrefWidth(150);
gomb.setPadding(new Insets(10, 10, 10, 10));
gomb.setTranslateX((jobb.getPrefWidth()-gomb.getPrefWidth())/2);
gomb.setTranslateY(50);
jobb.setStyle("-fx-background-color: #c2c2d6;");
jobb.getChildren().add(gomb);
Text manualTitle = new Text("Irányítás:");
manualTitle.setTranslateX(50);
manualTitle.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
manualTitle.setTranslateY(100);
jobb.getChildren().add(manualTitle);
GridPane moveHolder = new GridPane();
moveHolder.setAlignment(Pos.CENTER);
moveHolder.setHgap(10);
moveHolder.setVgap(10);
moveHolder.setPrefWidth(200);
moveHolder.setPrefHeight(400);
Text moveUp = new Text("↑ - Felfele lépés");
moveUp.setTextAlignment(TextAlignment.CENTER);
moveUp.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
moveHolder.add(moveUp, 0, 0, 2, 1);
Text moveDown = new Text("↓ - Lefele lépés");
moveDown.setTextAlignment(TextAlignment.CENTER);
moveDown.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
moveHolder.add(moveDown, 0, 1, 2, 1);
Text moveLeft = new Text("← - Balra lépés");
moveLeft.setTextAlignment(TextAlignment.CENTER);
moveLeft.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
moveHolder.add(moveLeft, 0, 2, 2, 1);
Text moveRight = new Text("→ - Jobbra lépés");
moveRight.setTextAlignment(TextAlignment.CENTER);
moveRight.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
moveHolder.add(moveRight, 0, 3, 2, 1);
jobb.getChildren().add(moveHolder);
gomb.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
playGround.lepes = 0;
playGround.celban = 0;
playGround.getDatum();
playGround.resetPlayGround();
updatePlayGround();
playGround.nyertes = 0;
playGround.kezdes = 1;
}
});
return jobb;
}