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