當前位置: 首頁>>代碼示例>>Java>>正文


Java VBox.setId方法代碼示例

本文整理匯總了Java中javafx.scene.layout.VBox.setId方法的典型用法代碼示例。如果您正苦於以下問題:Java VBox.setId方法的具體用法?Java VBox.setId怎麽用?Java VBox.setId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.layout.VBox的用法示例。


在下文中一共展示了VBox.setId方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MainMenu

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
public MainMenu(Stage primaryStage, UsersModel usersModel){	
	this.primaryStage = primaryStage;
	this.usersModel = usersModel;
	BorderPane root = new BorderPane();
	VBox buttons = new VBox();
	buttons.setId("vbox");
	buttons.setAlignment(Pos.CENTER);
	buttons.getChildren().addAll(
			backgroundImage(),
			playGame, 
			authorGame, 
			socialCenter);

	playGame.setId("main-button");
	authorGame.setId("main-button");
	socialCenter.setId("main-button");
	root.setCenter(buttons);		

	initHandlers();
	scene = new Scene(root, App.WIDTH, App.HEIGHT);
	scene.getStylesheets().setAll(CSS_LOCATION);
	primaryStage.setScene(scene);
}
 
開發者ID:LtubSalad,項目名稱:voogasalad-ltub,代碼行數:24,代碼來源:MainMenu.java

示例2: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox root = new VBox();
    root.setStyle("-fx-background-color:black");
    root.getStyleClass().add("about-stage");
    root.setId("aboutStage");
    root.getChildren().addAll(FXUIUtils.getImage("marathon-splash"), infoBox, buttonBar);
    return root;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:9,代碼來源:AboutStage.java

示例3: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox root = new VBox();
    root.setId("MarathonInputStage");
    root.getStyleClass().add("marathon-input");

    VBox container = new VBox();
    FormPane inputFieldform = new FormPane("marathon-input-form", 2);
    inputFieldform.addFormField(getInputFiledLabelText(), inputField);
    container.getChildren().addAll(inputFieldform, errorMsgLabel);
    root.getChildren().addAll(container, buttonBar);
    return root;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:13,代碼來源:MarathonInputStage.java

示例4: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox root = new VBox();
    root.getStyleClass().add("fixture-selection");
    root.setId("fixtureSelection");
    root.getChildren().addAll(fixtureList, buttonBar);
    return root;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:8,代碼來源:FixtureSelection.java

示例5: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox content = new VBox();
    content.getStyleClass().add("credits-stage");
    content.setId("creditsStage");
    content.getChildren().addAll(webView, buttonBar);
    return content;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:8,代碼來源:CreditsStage.java

示例6: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox content = new VBox();
    content.setId("FixtureStage");
    content.getStyleClass().add("fixture");
    FormPane form = new FormPane("fixture-form", 2);
    //@formatter:off
    form.addFormField("Name: ", nameField)
        .addFormField("Description: ", descriptionArea)
        .addFormField("Resuse Fixture: ", reuseField);
    //@formatter:on
    content.getChildren().addAll(form, applicationLayout.getContent(), buttonBar);
    fixtureStageInfo.setProperties();
    return content;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:15,代碼來源:FixtureStage.java

示例7: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox root = new VBox();
    root.setId("FileSelectionStage");
    root.getStyleClass().add("file-selection");
    root.getChildren().addAll(createBrowserField(), createButtonBar());
    return root;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:8,代碼來源:FileSelectionStage.java

示例8: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox content = new VBox();
    content.setId("ProjectSelectionParent");
    content.getStyleClass().add("project-selection");
    content.getChildren().addAll(projectInfotable, buttonBar);
    return content;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:8,代碼來源:ProjectSelection.java

示例9: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox root = new VBox();
    root.setId("MPFConfigurationParent");
    root.getStyleClass().add("mpf-configuration");
    root.getChildren().addAll(createTabPane(), createButtonBar());
    setProperties(mpfConfigurationInfo.getUserProperties());
    return root;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:9,代碼來源:MPFConfigurationStage.java

示例10: getContent

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override public Node getContent() {
    VBox content = new VBox();
    content.setId("CompositeLayout");
    content.getStyleClass().add("composite-layout");

    FormPane form = new FormPane("composite-layout-form", 2);
    form.addFormField(getOptionFieldName(), optionBox);

    content.getChildren().addAll(form, optionTabpane);
    return content;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:12,代碼來源:CompositeLayout.java

示例11: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox content = new VBox();
    content.getStyleClass().add("blurb-stage");
    content.setId("blurbStage");
    content.getChildren().addAll(webView, buttonBar);
    return content;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:8,代碼來源:Blurb.java

示例12: getContentPane

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
@Override protected Parent getContentPane() {
    VBox root = new VBox();
    root.setStyle("-fx-background-color:black");
    root.setId("marathonITESplashScreen");
    root.getStyleClass().add("marathonite-splash-screen");
    root.getChildren().addAll(FXUIUtils.getImage("marathon-splash"), createInfo());
    Timeline timeline = new Timeline(new KeyFrame(SPLASH_DISPLAY_TIME, (e) -> {
        dispose();
    }));
    timeline.play();
    return root;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:13,代碼來源:MarathonSplashScreen.java

示例13: createGamePoster

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
public Node createGamePoster (IGame game) {
    VBox vBox = new VBox();
    vBox.setId(myBundle.getString("poster"));
    vBox.getChildren()
            .add(createImage(game));
    vBox.getChildren().add(createLabel(game.getGameInformation().getNameProperty().get()));
    vBox.getChildren().add(createLabel(game.getGameInformation().getAuthorProperty().get()));
    return vBox;
}
 
開發者ID:tomrom95,項目名稱:GameAuthoringEnvironment,代碼行數:10,代碼來源:GamePosterFactory.java

示例14: createVerticalButtonBar

import javafx.scene.layout.VBox; //導入方法依賴的package包/類
private VBox createVerticalButtonBar() {
    VBox vBox = new VBox();
    vBox.setId("VerticalButtonBar");
    if (isTraversalNeeded()) {
        upButton = FXUIUtils.createButton("up", "Move selection up", true, "Up");
        setButtonState(upButton, false);
        upButton.setOnAction(new UpDownHandler(classPathListView, true));
        upButton.setMaxWidth(Double.MAX_VALUE);
        downButton = FXUIUtils.createButton("down", "Move selection down", true, "Down");
        setButtonState(downButton, false);
        downButton.setOnAction(new UpDownHandler(classPathListView, false));
        downButton.setMaxWidth(Double.MAX_VALUE);
        vBox.getChildren().addAll(upButton, downButton);
    }

    if (isAddArchivesNeeded()) {
        addJarsButton = FXUIUtils.createButton("addjar", "Add JAR/ZIP files to class path", true, "Add Archives...");
        addJarsButton.setOnAction(new BrowseActionHandler(
                new FileSelectionInfo("Select Zip/Jar files", "Java Archives", new String[] { "*.jar", "*.zip" },
                        "Add Zip/Jar files to the application classpath", FXUIUtils.getIcon("addjar"))));
        vBox.getChildren().add(addJarsButton);
    }

    if (isAddFoldersNeeded()) {
        addFoldersButton = FXUIUtils.createButton("addfolder", "Add folders to class path", true, "Add Folders...");
        addFoldersButton.setOnAction(new BrowseActionHandler(new FileSelectionInfo("Select Folders", null, null,
                "Add class files from folders to classpath", FXUIUtils.getIcon("addfolder"))));
        addFoldersButton.setMaxWidth(Double.MAX_VALUE);
        vBox.getChildren().add(addFoldersButton);
    }

    deleteButton = FXUIUtils.createButton("remove", "Delete selection", true, "Remove");
    setButtonState(deleteButton, false);
    deleteButton.setOnAction((e) -> {
        ObservableList<ClassPathElement> selectedItems = classPathListView.getSelectionModel().getSelectedItems();
        if (selectedItems != null) {
            classPathListItems.removeAll(selectedItems);
            boolean enable = classPathListItems.size() != 0;
            setButtonState(deleteButton, enable);
            setButtonState(upButton, enable);
            setButtonState(downButton, enable);
            classPathListView.getSelectionModel().select(-1);
        }
    });
    deleteButton.setMaxWidth(Double.MAX_VALUE);
    vBox.getChildren().addAll(deleteButton);
    return vBox;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:49,代碼來源:ListLayout.java


注:本文中的javafx.scene.layout.VBox.setId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。