本文整理匯總了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;
}